Selecting a directory or folder in Hyperlink dialog box

E

Ellen G

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
 
J

Jim Cone

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" <[email protected]>
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top