Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SMV SMV is offline
external usenet poster
 
Posts: 1
Default how to open a url in a new window from VBA on Excel

Hi,

How do we open a url in a new window from VBA on Excel?
I am checking some values in the cell and depends upon the
value, it should direct to particular url.

please help.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default how to open a url in a new window from VBA on Excel

The basic statements to open an URL using VAB is:

If Workbooks.Count = 0 Then Workbooks.add
ActiveWorkbook.FollowHyperlink address:="http://www.microsoft.com", NewWindow:=True

Note the first line to add a new workbook if no workbook is currently available. This is not mandatory. But in case there is no workbook available, the FollowHyperlink link will give an error. Use that line if you're working on an add-in. Ingnore that if not.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can only open one window with excel William Excel Discussion (Misc queries) 4 January 14th 09 02:12 PM
I need to open all Hyperlinks in excel in same window Satish Excel Discussion (Misc queries) 0 May 1st 07 02:15 PM
Open Excel Hyperlinks in a new window Andymeadowsuk Excel Discussion (Misc queries) 0 October 30th 06 11:36 PM
excel open in new window Peter Excel Discussion (Misc queries) 4 November 10th 05 05:05 PM
Excel workbook does not open in open window on desktop DeanH Excel Discussion (Misc queries) 2 March 8th 05 09:51 AM


All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"