#1
|
|||
|
|||
open hyperlink in new tab
hello everyone I am using excel 2003 and would like some vba code on opening several websites in new tabs for internet explorer. I have the following code.
Sub urltabs () const navopeninnewtab = &H800 set tabby = createobject ("internetexplorer.application") tabby.visible = true tabby.navigate "http://www.google.com" tabby.navigate "http://www.yahoo.com", clng(navopeninnewtab) tabby.navigate "http://www.msn.com", clng(navopeninnewtab end sub everything works great with this code but I want the user to be able to put the urls in cells rather than change them in the vba editor how can I accomplish this? |
#2
|
||||
|
||||
You can use an InputBox, but you'll need to add code that validates whatever the user inputs.
StrHlink = InputBox("What is the URL to use?" & vbcr & _ "e.g: http://www.google.com","Navigation Input") 'validation code goe here tabby.navigate StrHlink
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Hyperlink to open Word Document at Specific Header | rossi45 | Word | 2 | 05-04-2012 06:03 PM |
HyperLink help please | malfromcessnock | Excel | 6 | 12-24-2011 11:43 PM |
Hyperlink | Mahmuz | Word | 2 | 05-04-2011 10:59 AM |
Open DOCX in Word 2007 & Open DOC in Word 2003 | wilde_37 | Office | 0 | 02-03-2009 12:37 AM |
I cannot open a hyperlink in an office 2003 program | ArmandoS | Office | 3 | 11-26-2005 12:11 PM |