A few years back, I created VBA code to access a webpage in Internet Explorer and fill textboxes with information from an Excel file. Unfortunately, after I upgraded to Windows 10, this software is no longer functional. The page loads without a hitch, but the data cannot be entered into the textboxes. It only launches the website and then freezes (no data is entered).
Windows 7's IE still runs the software without any issues. I tried several computers running Windows 10 and the issue still persists.
I tried modifying the IE.Document-related code at the end.
All("Response 123").
IE.Document value
I attempted to use getElementById("Response 123") to copy the values from my Excel spreadsheet into the textbox, but nothing happened.
Sub test()
Dim IE As Object
WebAddress = "https://CONFIDENTIAL_URL.com/"
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate WebAddress
While IE.busy
DoEvents 'wait until IE is done loading page.
Wend
Application.wait (Now + TimeSerial(0, 0, 4))
IE.Document.getElementById("Response_123").Value = ThisWorkbook.Sheets("Sheet1").Range("B5")
End Sub
I would expect the value in my Excel sheet at B5 to be copied into the textbox that has ID "Response_123" (obtained from right clicking textbox > inspect), but it does not copy anything and remains blank. Again, I have no problem getting my code to work in Windows 7.