putting a function in directory path VBA

  • Thread starter Thread starter GregB
  • Start date Start date
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
 
Application.FollowHyperlink "C:\Documents and Settings\" & GetUserName() &
"\Desktop\Shortcut.lnk"
 
Back
Top