Hi.
I have this macro and i want to locate a textbox in a web.
Sub Pruebas()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Silent = True
IE.Navigate "http://www.opineygane.com/"
Application.Wait (Now() + TimeValue("00:00:05"))
Set ieEle = Nothing
Set wieCol = IE.document.getElementsByTagName("A")
i = 0
Do While i < wieCol.Length
If InStr(1, wieCol(i).innerText, "Iniciar sesión") > 0 Then
Set ieEle = wieCol(i)
Exit Do
End If
i = i + 1
Loop
ieEle.Click
Application.Wait (Now() + TimeValue("00:00:05"))
Set wFrames = IE.document.frames
i = 0
Do While i < wFrames.Length
Set wHtmlDoc = wFrames.Item(i).document --> in this point show me the error "error access denied"
Views: 14
Size: 21.6 KB
Set ieEle = Nothing
Set wieCol = IE.document.getElementsByTagName("input")
j = 0
Do While j < wieCol.Length
If InStr(1, wieCol(j).ID, "TextBox1") > 0 Then
Set ieEle = wieCol(j)
Exit Do
End If
j = j + 1
Loop
i = i + 1
Loop
End Sub
What am i doing wrong?
Thanks.
Bookmarks