Opening a pdf file from a button

R

reidarT

I have pdf-files in a folder.
When the file exists I want to open it by clicking a button. How do I do
that?
reidarT
 
F

fredg

I have pdf-files in a folder.
When the file exists I want to open it by clicking a button. How do I do
that?
reidarT

You can code the click event on a command button, for example:

Application.FollowHyperlink "c:\Foldername\FileName.pdf"

Use error handling to trap the error raised if the file does not
exist.
 

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