Hi All
Thanks for all your replies. I couldn't quite get some of the example code to work as i need but it's led me in the right direction. The below code seems to be working as i need it to.
Any changes need ??
Sub CreateDesktopShortCut()
Dim sPathDeskTop As String, sShortcutTitle As String, sFolderPath As String
With CreateObject("WScript.Shell")
sPathDeskTop = .SpecialFolders("Desktop") & "\"
sShortcutTitle = "Work Instruction Pending"
sFolderPath = Environ("userprofile") & "\Documents\Complex Work Instructions\Pending\"
With .CreateShortCut(sPathDeskTop & sShortcutTitle & ".lnk")
.TargetPath = sFolderPath
.Save
End With
End With
End Sub
__._,_.___
Posted by: garymust@yahoo.co.uk
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar