ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting a directory or folder in Hyperlink dialog box (https://www.excelbanter.com/excel-programming/439531-selecting-directory-folder-hyperlink-dialog-box.html)

Ellen G

Selecting a directory or folder in Hyperlink dialog box
 
I am building a macro that will automate the first few steps of building a
hyperlink. Because I don't know the location or name of the file to which the
hyperlink will point, I would like the user to complete the process past a
certain point.

So, I have the following items in the macro thus far (for 2007):

Application.SendKeys ("%NI")
Application.SendKeys ("%L")

This opens the Hyperlink dialog box and then activates the Look In block.
Now I would like to direct it to a certain directory in the Look In block
allowing the user to complete the hyperlink path.

How to I direct the Look In to something like: p:\Marketing\Clients

Thanks for your help.

Ellen

Jim Cone[_2_]

Selecting a directory or folder in Hyperlink dialog box
 

Using the dialogs collection would be a better way to show the hyperlink box...
Application.Dialogs(xlDialogInsertHyperlink).Show

Also look at using the ChDrive and/or ChDir methods before and after showing the dialog box.
--
Jim Cone
Portland, Oregon USA



"Ellen G"
wrote in message
...
I am building a macro that will automate the first few steps of building a
hyperlink. Because I don't know the location or name of the file to which the
hyperlink will point, I would like the user to complete the process past a
certain point.

So, I have the following items in the macro thus far (for 2007):

Application.SendKeys ("%NI")
Application.SendKeys ("%L")

This opens the Hyperlink dialog box and then activates the Look In block.
Now I would like to direct it to a certain directory in the Look In block
allowing the user to complete the hyperlink path.
How to I direct the Look In to something like: p:\Marketing\Clients
Thanks for your help.
Ellen


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com