Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hello Using windowsXP Prof. and excel 2003 Is there a way to create a shortcut of an excel file on the Desktop using a macro? If yes, can anyone tell me how? Thanks Francesco |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
'----------------------------------------------------------------
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) "Francesco" wrote in message ... Hello Using windowsXP Prof. and excel 2003 Is there a way to create a shortcut of an excel file on the Desktop using a macro? If yes, can anyone tell me how? Thanks Francesco |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks a lot Bob it works fine
Regards Francesco "Bob Phillips" wrote: '---------------------------------------------------------------- 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) "Francesco" wrote in message ... Hello Using windowsXP Prof. and excel 2003 Is there a way to create a shortcut of an excel file on the Desktop using a macro? If yes, can anyone tell me how? Thanks Francesco |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Outlook Attachments opening after several errors everytime | Setting up and Configuration of Excel | |||
I need a shortcut to make a excel file open to a specific sheet | Excel Discussion (Misc queries) | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
Unable to create any link/hyperlinks in a particular excel file | Excel Discussion (Misc queries) | |||
How to I create a pdf file from Word or Excel files | Excel Discussion (Misc queries) |