All I did was copy-paste a piece of code that worked perfectly fine in a different sub into my new sub and change the URL I wanted to navigate. The first sub still works, but the second one doesn't. I'm pretty stumped.
Dim ie As InternetExplorer
Dim html As HTMLDocument
Set ie = New InternetExplorer
ie.Visible = False
ie.navigate "http://cesp.hma.eu/Contacts"
With ie
Do Until .READYSTATE = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
End With
Set html = ie.document
Set ie = Nothing
Application.StatusBar = ""
Using F8 to check the code step by step, it seems that the URL ignores the ie.Visible = False
(it opens when I reach With ie
), then makes the error pop up on Do While .Busy: DoEvents: Loop
I honestly don't know where to start looking to fix this, since I literally only changed the URL and nothing else. My best bet was to just close my workbook and re-open it, but the issue decided to persist. Any hints, explanations, or solutions you can come up with would be greatly appreciated.