Hi Guys
I'm trying to set the desktop icon using VBA which is fine, however the shotcut isn't picking up the target path.
Any ideas?
I'm trying to set the desktop icon using VBA which is fine, however the shotcut isn't picking up the target path.
Any ideas?
With CreateObject("WScript.Shell")
With .CreateShortCut(.SpecialFolders("Desktop") & "\Demo Database.lnk")
.TargetPath = Environ("userprofile") & "\Documents\Demo Database\DemoDatabase.accdb"
.WindowStyle = 1
.Hotkey = ""
.IconLocation = Environ("userprofile") & "\Documents\Demo Database\cloud.ico, 0"
.Description = "Test Icon Substitution"
.WorkingDirectory = Environ("userprofile") & "\Documents\Demo Database\DemoDatabase.accdb"
.Save
End With
End With