Display the Hyperlink Dialog when inserting Hyperlinks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When inserting a hyperlink in VB how do I make it open the Hyperlink Dialog pop up so that the user then can select any file from any location

The code I have at the moment goes like the following

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=strFileNam

I could use an input box to get the file name from the user but if it is not in the current directory then they will have to type in the directory path as well which leaves to much room for error.
 
Tommo

Try this to open the dialog.......

Application.Dialogs(xlDialogInsertHyperlink).Show

Cheers
Nigel

Tommo said:
When inserting a hyperlink in VB how do I make it open the Hyperlink
Dialog pop up so that the user then can select any file from any location.
The code I have at the moment goes like the following:

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=strFileName

I could use an input box to get the file name from the user but if it is
not in the current directory then they will have to type in the directory
path as well which leaves to much room for error.
 
Thanks Nigel worked a treat


----- Nigel wrote: ----

Tomm

Try this to open the dialog......

Application.Dialogs(xlDialogInsertHyperlink).Sho

Cheer
Nige

Tommo said:
When inserting a hyperlink in VB how do I make it open the Hyperlin
Dialog pop up so that the user then can select any file from any locationnot in the current directory then they will have to type in the director
path as well which leaves to much room for error




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroup
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--
 
Back
Top