none
internetexplorer.application navigate error RRS feed

  • Question

  • Hi All
    I have a simple vb script that opens IE window and navigates to a link:

    Set oIE=createobject("internetexplorer.application")
    Do While (oIE.Busy)
    Wscript.Sleep 250
    Loop
    oIE.navigate "http://MyLink.htm"

    Most of the time it works fine but sometimes I am getting "Invalid procedure call or argument" error on  oIE.navigate line
    Is there anything I am doing wrong?

    Thanks
    • Moved by Bill_Stewart Thursday, December 20, 2018 10:01 PM Abandoned
    Friday, October 26, 2018 3:01 PM

All replies

  • Bad code formation:

    Set oIE=createobject("internetexplorer.application")
    oIE.navigate "http://MyLink.htm"
    Do While (oIE.Busy)
        Wscript.Sleep 250
    Loop
    


    \_(ツ)_/

    Friday, October 26, 2018 8:47 PM
  • Thanks Jrv, but with your code still getting "Invalid procedure call or argument" error on  oIE.navigate line and now IE window doesnt open at all :(
    Monday, October 29, 2018 9:55 AM
  • Set oIE=createobject("internetexplorer.application")
    oIE.Visible = True
    oIE.navigate "http://google.com"
    Do While oIE.Busy
        Wscript.Sleep 250
    Loop


    \_(ツ)_/

    Monday, October 29, 2018 10:05 AM