I have the following VBA code in Excel 2013 that most of the time opens IE in front of the Excel VBA executing and sometimes behind it. When IE opens behind Excel the VBA cannot operate on IE. I receive an automation error having to restart the script and manually having to click on the IE window just in time as it is created to force it to the front.
How can I enforce always opening the new IE window in front of the Excel VBA?
Set IE = CreateObject("InternetExpl
IE.Visible = True