- Katılım
- 24 Aralık 2010
- Mesajlar
- 24
- Excel Vers. ve Dili
- Microsoft® Excel® LTSC MSO (16.0.14332.20541) 32 bit Standart 2021
Merhaba,
Aşağıdaki web sayfasında kullanıcı adı,şifre ve kimdlik doğrulama alanlarını girmeye çalışıyorum ancak beceremedim, kod bilgim aşağıdaki gibi nerede hata yapıyorum yardımcı oalabilirmisiniz.
http://10.108.10.55:8080/BOE/BI
Aşağıdaki web sayfasında kullanıcı adı,şifre ve kimdlik doğrulama alanlarını girmeye çalışıyorum ancak beceremedim, kod bilgim aşağıdaki gibi nerede hata yapıyorum yardımcı oalabilirmisiniz.
http://10.108.10.55:8080/BOE/BI
Kod:
Private Sub CommandButton1_Click()
On Error Resume Next
Dim objIE As InternetExplorer
Dim HTMLdoc As MSHTML.HTMLDocument
Dim htmlInput As MSHTML.HTMLInputElement
Dim htmlColl As MSHTML.IHTMLElementCollection
sat = ActiveWindow.RangeSelection.Row
If Sayfa1.Cells(sat, "d") = "" Then
MsgBox "hatali satir sectiniz.."
Exit Sub
End If
Set objIE = New InternetExplorerMedium
objIE.navigate "http://10.108.10.55:8080/BOE/BI/" 'url
objIE.Visible = 1
Do While objIE.readyState <> READYSTATE_COMPLETE: DoEvents: Loop
Set HTMLdoc = objIE.document
HTMLdoc.getElementById("_id0:logon:AUTH_TYPE").Value = Sayfa1.Cells(sat, "f") 'SAP
HTMLdoc.getElementById("_id0:logon:USERNAME").Value = Sayfa1.Cells(sat, "d") 'Kullanıcı Adı
HTMLdoc.getElementById("_id0:logon:PASSWORD").Value = Sayfa1.Cells(sat, "e") 'şifre
Set htmlColl = HTMLdoc.getElementsByTagName("input")
Set a = HTMLdoc.getElementsByClassName("_id0:logon:logonButton")
For Each htmlInput In a
If Trim(htmlInput.Type) = "submit" Then
htmlInput.Click 'giriş butonuna tıklandı
Exit For
End If
Next htmlInput
End Sub
