![]() |
Use a macro to create a desktop shortcut?
Greetings Everyone,
Our IT group is going to move our stuff to a new server. Everyone's links to 3 spreadsheets will be obsolete. I want to put an Excel file where everyone can get it and have a macro in it that will create shortcuts on the user's desktop. The shortcuts will be for three separate files. Thanks in advance for your thoughts. Glen Ray |
Use a macro to create a desktop shortcut?
hi, on your desk top, right click and select new select shortcut goto browse and find the file select the file and it will show up on the desktop -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=518042 |
Use a macro to create a desktop shortcut?
Here is some code to create a desktop shortcut
'---------------------------------------------------------------- Sub CreateShortCut() '---------------------------------------------------------------- Dim oWSH As Object Dim oShortcut As Object Dim sPathDeskTop As String Set oWSH = CreateObject("WScript.Shell") sPathDeskTop = oWSH.SpecialFolders("Desktop") Set oShortcut = oWSH.CreateShortCut(sPathDeskTop & "\" & _ ActiveWorkbook.Name & ".lnk") With oShortcut .TargetPath = ActiveWorkbook.FullName .Save End With Set oWSH = Nothing End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) wrote in message oups.com... Greetings Everyone, Our IT group is going to move our stuff to a new server. Everyone's links to 3 spreadsheets will be obsolete. I want to put an Excel file where everyone can get it and have a macro in it that will create shortcuts on the user's desktop. The shortcuts will be for three separate files. Thanks in advance for your thoughts. Glen Ray |
All times are GMT +1. The time now is 12:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com