Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Display Icon
Is there a way change the display icon of a shortcut on the desktop either
with vba or an api call? -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Display Icon
ben,
If the icon already exits, then the code replaces it. So change the icon name/path and run the code. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware '------------------------------- Sub Desktopshortcut() Dim WSHShell As Object Dim MyShortcut As Object Dim DesktopPath As String Set WSHShell = CreateObject("WScript.Shell") DesktopPath = WSHShell.SpecialFolders("Desktop") Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\macrofun.lnk") With MyShortcut .TargetPath = _ "C:\Documents and Settings\user\My Documents\Excel Files\Help Files\macrofun.hlp" .IconLocation = "F:\Icons\Arrows\ARW03DN.ICO" .WindowStyle = 1 .Save End With Set WSHShell = Nothing Set MyShortcut = Nothing MsgBox "A shortcut has been placed on your desktop. ", vbInformation, " Primitive Software" End Sub '------------------------- "ben" (remove this if mailing direct) wrote in message Is there a way change the display icon of a shortcut on the desktop either with vba or an api call? -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Icon Sets - Display icon in one cell depending upon value in anoth | Excel Worksheet Functions | |||
how to display the drop down menu icon? | Excel Discussion (Misc queries) | |||
can't display link as icon | Excel Worksheet Functions | |||
Changing Display Icon | Excel Programming | |||
Toggling Display as Icon for OLE Object | Excel Programming |