这个代码是可以一次性打开好几个文档的代码,谁帮我改一下代码,可以先打开一个,关掉后再打开第二个文档
Dim lst As WinForm.ListBox
lst = e.Form.Controls("ListBox1")
Dim drs As List(Of DataRow)
For i As Integer = 0 To lst.Items.Count - 1
drs = DataTables("表A").Select("[第二列] = '" & lst.Items(i) & "'")
For n As Integer = 0 To drs.Count - 1
If drs(n).IsNull("第一列") =False Then
If FileSys.FileExists(drs(n)("第一列")) Then
If FileIsOpened(drs(n)("第一列"))= False Then
Try
Dim Proc As New System.Diagnostics.Process
Proc.StartInfo.FileName = drs(n)("第一列")
Proc.Start()
Catch ex As Exception
MessageBox.Show("没有相应的程序可以打开此文档!","执行提示!")
End Try
End If
End If
End If
Next
Next