VBA IE Automation | clicking button inside table

Worf

Well-known Member
Joined
Oct 30, 2011
Messages
3,758
Hi


  • Can you share the actual URL?
  • What does the code below give you?


Code:
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Sub test()
Dim IE As Object, htmlDoc As Object, URL$, elems, i%
Set IE = CreateObject("internetexplorer.application")
URL = "https://www.youtube.com/gaming"  ' your URL here
With IE
    .navigate (URL)
    .Visible = True
End With
WaitIE IE, 2000
Set htmlDoc = IE.Document
Set elems = htmlDoc.getElementsByTagName("input")
For i = 0 To elems.Length - 1
    MsgBox elems(i).Name & vbLf & elems(i).Type, 64, i
Next
End Sub


Sub WaitIE(IE As Object, Optional time As Long = 250)
Do
    Sleep time
Loop Until IE.readyState = 4 Or Not IE.Busy
End Sub
 

Forum statistics

Threads
1,078,364
Messages
5,339,760
Members
399,321
Latest member
ladeko

Some videos you may like

This Week's Hot Topics

Top