0

I want to run Internet Explorer in background. I used this script and IE is opened but it's a visible window and not run in background.

On Error Resume Next

'Declare a new variable or array variable
Dim ie 

'Create an InternetExplorer Object
Set ie = CreateObject("InternetExplorer.Application")

'Set objExplorer.Visible = True to make IE visible, or False for IE to run in the background
ie.Visible = False

'Navigate to Defined URL
ie.Navigate "http://localhost:9090/csv_reader/csv.php"

'Perform IE functions here......
If err.number <> 0 then wscript.echo err.number & ":" & err.description

I found this script on this platform. I tried but couldn't get a proper result. Can anyone correct this script and suggest to me how to solve it?

11
  • 1
    I cannot reproduce your issue. The code you show does hide the IE window it opens, nothing is shown. Either you do not use exactly the code in your question or the issue is not your code but something else. • In which application (Excel, Word, …) do you use this code?
    – Pᴇʜ
    Commented Oct 14, 2020 at 12:47
  • I try to check your sample code and the code looks fine. ie.Visible = False working correctly and the IE browser does not get visible. I suggest close all existing IE windows and then try to run the above code sample. Check whether it works properly or not. Commented Oct 15, 2020 at 3:20
  • yes, I used this code as a .VBA file, IE not run in background @Pᴇʜ Thank you for reply Commented Oct 15, 2020 at 10:06
  • yeah sir i will check as you suggest me @Deepak-MSFT Thank you Commented Oct 15, 2020 at 10:07
  • @Deepak-MSFT sir it's not working in the background, IE gets open in desktop Commented Oct 15, 2020 at 10:16

0