根据文件名编码打开文件,如果存在,就打开,不存在就提示,以下代码错在哪?
Dim F1 As String = ProjectPath & "xp.txt"
F1 = FileSys.ReadAllText(F1,Encoding.Default)
Dim files() As String = System.IO.Directory.GetFiles(F1 & "中兴规格书\" , e.Row("物料代码") & "*.xls")
For Each file As String In files
If FileSys.FileExists(file) Then
Dim Proc As New Process
Proc.File = file
Proc.Start()
Else
MessageBox.Show("文件不存在!","提示")
'e.Cancel = True
End If
Next
[此贴子已经被作者于2020/10/25 10:10:15编辑过]