I wrote code in VBA a couple years ago to open a website in IE and fill in textboxes with data from an excel file. Unfortunately I am using windows 10 now and this program is not working anymore. It opens the website with no problem, but cannot transpose the data into the textboxes. It simply opens the website and stalls (no data is entered).
The program still works in IE in windows 7, without any problem. I tried multiple laptops with windows 10 and the problem reoccurs.
I honestly don't know how to fix this.
DoEvents
WebAddress = "CONFIDENTIAL URL HERE" & WebID & "&t="
Dim IE As Object
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate WebAddress
IE.Visible = True
While IE.busy
DoEvents 'wait until IE is done loading page.
Wend
Application.Wait (Now + TimeSerial(0, 0, 4))
IE.Document.All("Response_123").Value = ThisWorkbook.Sheets("Sheet1").Range("B5")
The last line of code should transfer data from the excel file to the textbox in internet explorer, however nothing happens and the textbox remains blank. Do I need to change anything in my code to account for windows 10 IE?
You can see that your code was not written in an efficient way. For an alternative approach, You can refer example below which is working fine with Windows 10.
Output:
If we talk about your above posted code than you can try to put the break point on that line and try to debug the code. Check that Which value contained by Cell B5 and check whether that line get execute successfully or not. For testing purpose, try to assign static value to that textbox.