LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default icon problem

Good day, i got some code from Bob Phillips, to create an icon and added
in iconlocation from his suggestion which works 100%.
I want to send all the users an excel file with the code in and when
they open it, it will create folders and save the file in there. I then
create a short cut and then want to assign a different icon to it.
I am not sure how to do last portion, should i insert the icon on the
spread sheet so that it can save it also to the folder ?


----------------------------------------------------------------
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
.IconLocation "C:\icons\test.ico"
.Save
End With
Set oWSH = Nothing

End Sub



Tempy

*** Sent via Developersdex http://www.developersdex.com ***
 
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
Icon Sets - Display icon in one cell depending upon value in anoth Nolene Excel Worksheet Functions 2 February 26th 10 05:43 AM
Excel 03 desktop file icon problem P2PNewAccessUser Excel Discussion (Misc queries) 2 October 30th 06 01:04 AM
Little problem, when click open icon Adam Excel Discussion (Misc queries) 1 March 17th 06 11:17 AM
java icon doug929 Excel Programming 1 April 21st 05 04:11 PM
Icon Robin Clay[_3_] Excel Programming 2 December 10th 03 09:36 AM


All times are GMT +1. The time now is 02:54 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"