How to start a shortcut from a the onclick event

  • Thread starter Thread starter GregB
  • Start date Start date
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
 
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.)
 
Back
Top