再请教下啊。。如果我有两个
WebBrowser打开两个excel
axWebBrowser1 = Nothing
Dim web1 As Windows.Forms.WebBrowser
web1 = e.form.Controls("WebBrowser1").baseControl
AddHandler web1.DocumentCompleted,addressof WebBrowser1_DocumentCompleted
web1.Navigate(ProjectPath & "1.xls")
Do While axWebBrowser1 Is Nothing
Application.Doevents
Loop
Dim
oDocument1 As object = axWebBrowser1.Gettype().InvokeMember("Document",
System.Reflection.BindingFlags.GetProperty, Nothing, axWebBrowser1,
Nothing)
Dim oApplication1 As object =
axWebBrowser1.Gettype().InvokeMember("Application",
System.Reflection.BindingFlags.GetProperty, Nothing, oDocument1, Nothing)
oDocument1.WorkSheets(1).range("2:2").Select
axWebBrowser2 = Nothing
Dim web2 As Windows.Forms.WebBrowser
web2 = e.form.Controls("WebBrowser2").baseControl
AddHandler web1.DocumentCompleted,addressof WebBrowser2_DocumentCompleted
web2.Navigate(ProjectPath & "2.xls")
Do While axWebBrowser2 Is Nothing
Application.Doevents
Loop
Dim
oDocument2 As object = axWebBrowser2.Gettype().InvokeMember("Document",
System.Reflection.BindingFlags.GetProperty, Nothing, axWebBrowser2,
Nothing)
Dim oApplication2 As object =
axWebBrowser2.Gettype().InvokeMember("Application",
System.Reflection.BindingFlags.GetProperty, Nothing, oDocument2, Nothing)
oDocument2.WorkSheets(1).range("2:2").Select
好像不行 