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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

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,144,356
Messages
5,723,887
Members
422,524
Latest member
wirkkarn

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