Sub Scrambledata()
Dim ie As Object, objInputs As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate "http://www.scramble.nl/military-database/usaf"
Do While ie.readyState <> 4: DoEvents: Loop
'~~> Get the ID of the textbox where you want to output
ie.document.getElementById("serial").Value = Sheets("Scramble").Range("A2").Value
'~~> Here we try to identify the search button and click it
Set objInputs = ie.document.getElementsByTagName("input")
For Each ele In objInputs
If ele.Name Like "sbm" Then
ele.Click
Exit For
End If
Next
Application.Wait (Now + TimeValue("0:00:02"))
Sheets("Scramble").Range("B2").Value = ie.document.getElementsByClassName("ScrambleLabel")(11).innerText
End Sub
Thank you, Arkadi
Modified code above works for me even with 2 sec delay
Bookmarks