I want to put a file name in a text field, then open that file by

M

mert

I want to put a file name in a text field, then open that file (using the
applicaton appropriate for that file type) by double-clicking on the text
field.

Can anyone tell me how to do this?
 
F

fredg

I want to put a file name in a text field, then open that file (using the
applicaton appropriate for that file type) by double-clicking on the text
field.

Can anyone tell me how to do this?

If the path to each file is different, enter the full path to the file
as well as the file name and extension into the field, i.e.
c:\FolderName\FileName.ext

Code the control's double-click event:
Application.FollowHyperlink [ControlName]

If the path is always the same, with just the file name different,
enter just the file name and extension.
Code the AfteUpdate event:
Application.FollowHyperlink "c:\FolderName\" & [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