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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Mind Drive

New Member
Joined
Dec 7, 2010
Messages
3
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
 

Forum statistics

Threads
1,181,333
Messages
5,929,365
Members
436,664
Latest member
plobo4

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
Top