Çalışmak için Excel'de bir form gönderimini otomatikleştirmeye çalışıyorum ve Temel bilgilerle ilgili sorun yaşıyorum. Ben hata mesajı almaya devam: olduğu gibi kod ileExcel VBA "IWebBrowser2" nesnesinin 'Yöntem' Belgesi 'başarısız oldu "
"Method 'Document' of object 'IWebBrowser2' failed"
ve ben bekleme kontrol altında Veya parçasını eklerseniz, ben
"Automation Error The object invoked has disconnected from its clients."
emin değilim hatayı ne elde etmek Burada, çözümler için her yeri aradım. Bu kod sonunda bundan daha fazlasını yapmak için tasarlanmıştır, ancak ilk denemede getElementsByTagName
başarısız oluyor.
Sub GoToWebsiteTest()
Dim appIE As Object 'Internet Explorer
Set appIE = Nothing
Dim objElement As Object
Dim objCollection As Object
If appIE Is Nothing Then Set appIE = CreateObject("InternetExplorer.Application")
sURL = *link*
With appIE
.Visible = True
.Navigate sURL
End With
Do While appIE.Busy ' Or appIE.ReadyState <> 4
DoEvents
Loop
Set objCollection = appIE.Document.getElementsByTagName("input")
Set appIE = Nothing
End Sub
Cevabınız için çok teşekkürler, şimdi çalışıyor! (en azından, bundan sonra başka bir soruna vurarak: /) –