老师,下面代码不能按指定的单元格打开文件,而是必须关闭窗口后重新指定单元格才能打开,打开后又有关闭窗口后重新指定才能打开。
If GetConfigValue("文件夹路径" & ComputerId,"") = "" Then
MessageBox.Show("请先指定存储路径!","提醒")
Return
End If
If Tables("入库.入库明细").Current.isnull("piao据原件") = True Then '若未存储文件名
MessageBox.Show("未上传文件!","提醒")
Return
End If
If e.Form.Controls("文件名").text = "文件已被删除!" Then
Tables("入库.入库明细").Current("piao据原件") = Nothing
e.Form.Controls("文件名").text = "未上传文件!"
e.Form.Controls("PictureBox1").image = getimage("other.png")
Return
End If
Dim proc As new Process
proc.File = e.Form.Controls("路径").text & "\" & e.Form.Controls("文件名").text
proc.Start