putting a function in directory path VBA

G

GregB

I have a function that I created which returns the machines name

=GetUserName

Now I call a shortcut to start a program from within Access,

Application.FollowHyperlink "C:\Documents and
Settings\USERNAME\Desktop\Shortcut.lnk"

The MACHINENAME is going to be different for everyone that uses it, how can
I include the =GetUserName into the directory path of the shortcut???

I have been fiddeling around with this for to long.

Any help is much appreciated
Thanks
 
V

vseale

Application.FollowHyperlink "C:\Documents and Settings\" & GetUserName() &
"\Desktop\Shortcut.lnk"
 

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