How to start a shortcut from a the onclick event

G

GregB

I have a button that I wish to open a shortcut.
I have tried using the shell command but from my research the file has to
end in an .exe to functrion properly.

I need to open the shortcut beacuse the shortcut passes on information of
the user to automatically log them into the application that it starts.

So how can I use VBA to open a shortcut?

THanks
 
D

Douglas J. Steele

Application.FollowHyperlink path

where path is a string containing the complete path.

For example,

Application.FollowHyperlink "C:\Folder\File.doc"

or

Application.FollowHyperlin " http://www.mvps.org/access "

(Note that in the second example, I only put the spaces after the first
double quote and before the second double quote so that they'd appear in
what was presented. You wouldn't actually include those spaces.)
 

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