Does anyone have some code that will automatically create a shortcut to the sheet they open.
The shortcut will be placed on the desktop and will only be created the first time they open the sheet.
TIA
Does anyone have some code that will automatically create a shortcut to the sheet they open.
The shortcut will be placed on the desktop and will only be created the first time they open the sheet.
TIA
[VBA]
'----------------------------------------------------------------
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
[/VBA]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Brilliant
Works a treat.
thank you for your time