VBA - Open Internet Explorer

Had someone email me asking how to open up Internet Explorer when the macro is run and go to a certain page. This was moments after I answered a board post asking how to do it. So I figured I'd throw a quick code up. This is how you open up Internet Explorer to a specified page when the macro is run:


Sub ie_open()
    Dim ie As Object
    Set ie = CreateObject("INTERNETEXPLORER.APPLICATION")
    ie.NAVIGATE "http://www.excelandvba.com"
    ie.Visible = True
End Sub

3 comments:

  1. thanks.
    Also, let's say i want to access my gmail account and let the macro log me in automatically. How do we go about that?

    ReplyDelete
    Replies
    1. Did you figure this out? It is EXACTLY what I am looking for.
      Thanks!

      Delete
  2. I want to give any cell value on google page Is it possible with this code ?

    ReplyDelete

Open Your Business to the World! $7.99 .COMS at Go Daddy