Short cuts?

  • Thread starter Thread starter Bob Phillips
  • Start date Start date
B

Bob Phillips

Hi Greg,

Here is some code

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

RP
(remove nothere from the email address if mailing direct)
 
Is there a way to get excel in a macro to put a shortcut to the current file
on to the desktop?

Thanks in advance

Greg
 
Back
Top