Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Control desktop Icon

I am using this code to create a launch icon on the desktop..

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 &
"\EngstoreSpecial.lnk")
With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.Save
End With
Set WSHShell = Nothing
End Sub

Is it possible to control the symbol so a pre-determined picture icon
can be used?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Control desktop Icon

With myShortcut
.IconLocation = "x:\somefolder1\somefolder2\someicon.ico"
...



Snowfire wrote:

I am using this code to create a launch icon on the desktop..

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 &
"\EngstoreSpecial.lnk")
With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.Save
End With
Set WSHShell = Nothing
End Sub

Is it possible to control the symbol so a pre-determined picture icon
can be used?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Control desktop Icon

Yes you can do that, try this

With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.IconLocation = "%SystemRoot%\system32\SHELL32.dll, 22"
.Save
End With

Now finding out precisely which is which icon in Shell32.dll is something
you'll have to Google for but change the 22 to change to Icon

Mike



"Snowfire" wrote:

I am using this code to create a launch icon on the desktop..

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 &
"\EngstoreSpecial.lnk")
With MyShortcut
.TargetPath = LocalPathExcelControlSpecial
.Save
End With
Set WSHShell = Nothing
End Sub

Is it possible to control the symbol so a pre-determined picture icon
can be used?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop File Icon Josh O. Setting up and Configuration of Excel 3 August 23rd 07 09:30 PM
Desktop icon name Les Stout[_2_] Excel Programming 4 March 6th 07 02:29 PM
Change desktop icon Tempy Excel Programming 3 September 21st 05 05:01 PM
how can i put the excel icon on my desktop? petre Excel Discussion (Misc queries) 4 February 20th 05 05:29 PM
Delete desktop icon with VBA Francis Ang Excel Programming 1 May 26th 04 10:25 AM


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"