How to open a website in the browser from Excel using a Macro and VBA.
This is the same as following a link or clicking a link from the worksheet except that it will be done through a Macro.
This does not open a website within Excel. Everything will still open in the browser.
Here is the full macro that you need:
Sub Go_to_Website()
Dim ie As Object
Set ie = CreateObject("INTERNETEXPLORER.APPLICATION")
ie.NAVIGATE "http://www.google.com"
ie.Visible = True
While ie.busy
DoEvents
Wend
End Sub
This is a simple macro and it will open the website into Internet Explorer by default.
To use the macro, change http://www.google.com to whatever website you want the user to visit.
You can also replace this with a variable that holds the website url in order to make this a bit more versatile. In that case, you would just replace "http://www.google.com" with the desired variable name and without the double quotation marks around the variable name.
This is a fairly simple macro and you should not need to change anything other than what I just mentioned.
If you don't know how to put this macro into Excel, you can read this tutorial here: Install a Macro into Excel
Make sure to download the sample file attached to this tutorial so you can get the macro ready to go in Excel.