Open URL address from excel

yosi

Board Regular
Joined
May 14, 2002
Messages
67
the code that allow me to open a web site from excel is -
ActiveWorkbook.FollowHyperlink Address:="http://www.mrexcel.com", NewWindow:=True

the problem - if the web site is open how to activate the window and not open a new window

changing true to false at the end of the code does not do the job
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
This answer is a LOOONG time coming. :) There are a few solutions involving SendKeys or the IE class. But there is a simpler solution:
  1. Place one URL in a cell in the workbook with your code. A hidden sheet should be fine for this purpose. We'll say you put it in cell B1 of the active sheet.
  2. Put the following in your code: ActiveSheet.Range("B1").Hyperlinks(1).Follow.
That's it!
Phil
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,046
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top