Enter file path in text box, use button to open file

S

silva

I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.
 
F

fredg

I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.



Code the command button's Click event:

Application.FollowHyperlink Me.[ControlName]
 
S

silva

Excellent! Thank you. That does exactly what I need it to do.

fredg said:
I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.



Code the command button's Click event:

Application.FollowHyperlink Me.[ControlName]
 

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