I'm trying to write something to launch internet explorer and wait until the page is loaded to progress to the next step. I have seen a few examples posted using vbs that are the same way I write them in vbs but they don't seem to work in the MS realm.
Working Vbs code ( this can be cut and pasted to test )
Code: Select all
Dim IE
Set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = 1
oIE.navigate "http://www.google.com/"
The code below is MS code using the Vbs code above
Code: Select all
VBSTART
Sub OpenPage
Dim oIE
oIE = CreateObject("InternetExplorer.Application")
oIE.visible = 1
oIE.navigate "http://sa.ams.solvay.com/"
End Sub
VBEND
VBR>OpenPage
Macro Scheduler
Microsoft VBScript compilation error : 1002
Syntax error
Line 14, Colum 3
Any of you MS experts out there know why this is happening? It doesn't seem to make any sense as the exact same code works fine as pure Vbs. If you notice normally in Vbs writers tend to reference the WScript object which you can't seem to do with in MS but I have not done that here and Vbs will still run the code with out a problem since the WScript object recognizes the CreateObject call being made.
Any advice or is there a MS way of telling if the IE object is still busy loading a page?
Support please feel free to respond to this also.
Thanks