Opening Internet Explorer Only from VBA

T

treesinger101

I have written some code to access the Internet, but I need to it to ignore
the default browser and open Internet Explorer only.

I am currently using:
ActiveWorkbook.FollowHyperlink Address:="https://www.blahblahblah.com/"

I have looked everywhere. I hope it is possible. For casual browsing I
prefer another browser; but for certain work related tasks, only IE works
properly.

Thank you for any help.
 
R

ron

I have written some code to access the Internet, but I need to it to ignore
the default browser and open Internet Explorer only.

I am currently using:
ActiveWorkbook.FollowHyperlink Address:="https://www.blahblahblah.com/"

I have looked everywhere.  I hope it is possible.  For casual browsing I
prefer another browser; but for certain work related tasks, only IE works
properly.

Thank you for any help.

Athena...Try the following...Ron

' set the url
my_url = "https://www.blahblahblah.com/"

' open IE
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate my_url
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
DoEvents
Loop

End With

' Do whatever

' Close IE
ie.Quit
 
T

treesinger101

It worked great except that I had no idea how to exit IE so that I wouldn't
get a debug message; so I just deleted from the "Do Until" loop to the "End
With" and that did the trick.
It also took me a few tries to get the window to open where I wanted, but I
really appreciate that piece of the code. I wouldn't have thought to
customize the window that way.

Thank you!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top