Is it possible to have a workbook, through vba, add a shortcut to another workbook to your desktop and/or start menu?
There are several users who will need to open and run a workbook that must remain in a specific folder. I can add a
shortcut to the default user desktop but not for the current users. I'd like to make a workbook that would automatically
(through a button or something) place a shortcut on their desktop and start menu to the specific workbook. This will avoid
having to go through with each person on how to find the file and some people don't even know how to make a shortcut. So I
can just email them a workbook to open and click on a button to make it all happen for them.
Thanks for any
Well for some reason the Search didn't bring up the threads that the Answers to similiar Questions does up top.
I found: http://www.ozgrid.com/forum/showthread.php?t=34910
Looks like a good starting point. I'll give it a try and see if I need more help after that. If someone might have a
further suggestion I'm all ears
Well I found how to add a Desktop Shortcut: Change $Workbook Name$ and $Workbook Path$ to Suit.
Dim WSH As Object
Dim WSHShortcut As Object
Dim strStationName As String
Dim strPath As String
Dim strDirectory As String
Dim strMsg As String
Set WSH = CreateObject("WScript.Shell")
strStationName = Sheet1.Range("B25").Value
strDirectory = "C:$Workbook Path$ " & strStationName & ".xls"
If strStationName = "" Then ' Checks to see if the user selected a name
MsgBox "You Must Choose a Station Name from the Drop Down Box"
If Not Len(Dir(strDirectory)) > 0 Then 'Checks to see if File Exists
MsgBox "The $Workbook Name$ for the Selected Station Name does not Exist. The Shortcut cannot be created. Please
Ask Someone for Help."
strPath = WSH.SpecialFolders("Desktop") & "" & "$Workbook Name$ " & strStationName & ".lnk"
Set WSHShortcut = WSH.CreateShortcut(strPath)
.TargetPath = "C:$Workbook Path$ " & strStationName & ".xls"
.Description = "$Workbook Name$ " & strStationName
.IconLocation = "C:Program FilesMicrosoft OfficeOFFICE11EXCEL.EXE,1"
.RelativePath = "C:$Workbook Path$"
.WorkingDirectory = "C:$Workbook Path$"
.Hotkey = ""
strMsg = "Success! Look for the $Workbook Name$ " & strStationName & " Shortcut on your Desktop" & vbNewLine & _
"This Workbook will now Close. Thank You!"
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
I Made a Workbook were the User Selects the Correct Station name from a Validation Drop Down Menu.
to add to it to the Start Menu?