+ Reply to Thread
Results 1 to 16 of 16

Changing the .ico icon of my excel file?

  1. #1
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Changing the .ico icon of my excel file?

    I would like to change the icon of my workbook to a different .ico file than the excel icon. I have already created the icon image file, and located here:

    G:\Timesheets\PDF_Archive\Miscellaneous\scsobadgeicon01.ico

    Is there a way to change the icon for my excel workbook without it affecting other excel workbooks unrelated to my project?
    Last edited by jonvanwyk; 03-29-2011 at 02:23 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing the .ico icon of my excel file?

    The icon on the workbook corner?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    I hadn't thought of that one...but sure...that one too. My original thought was the icon that the person double clicks on to open the workbook to begin with (or any subsequent shortcuts someone might make to their original timesheet file).

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing the .ico icon of my excel file?

    This code creates a Desktop icon

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    I cant get it to work yet. I imagine I might be putting the code in the wrong place. Does it just go into a module?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing the .ico icon of my excel file?

    I've never used that code, simply found it some time ago & stored in my code library.

    I've come up with this that works

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    @royUK ... I know you are an excel genius, so I am going to blame the fact I cant get your latest solution to work on my own ineptitude. Does it matter that the "G:\" drive is not my workstation's local harddrive? "G"\" is a shared drive on our intranet from which all of the timesheet workbooks will be opened. Like most of the planet, "C:\" is my local drive...but if I used that I would have to add the .ico file to every workstation in the department.

    Also, is the code supposed to go into a module, or into "ThisWorkbook" on the VBE? Thanks again for all of your help!

  8. #8
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    I realized that there was more that I had to change in the code royUK suggested. I have made the changes to the best of my ability, but my special icon is still not working :-( Any idea what I am doing wrong?


    Please Login or Register  to view this content.

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Changing the .ico icon of my excel file?

    This creates a shortcut of the file
    E:\example.xls
    In folder C:\

    Please Login or Register  to view this content.
    If you can't get it to work (after adaptation) in your situation please tell us:
    - the location and the filename you want to make a shortcut for
    - the location where the shortcut must be put.
    Last edited by snb; 03-29-2011 at 04:04 AM.



  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing the .ico icon of my excel file?

    You could try putting the icon in the same location as the workbook, then use ThisWorkBook.Path

  11. #11
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    The location of everything is:

    C:\Users\jmv\Desktop\

    G:\Timesheets\FY2011\Communications\FY2011 Timesheet Template.xlsb

    G:\Timesheets\PDF Archive\Miscellaneous\scsobadgeicon01.ico

  12. #12
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Changing the .ico icon of my excel file?

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by snb; 03-30-2011 at 08:48 AM.

  13. #13
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    @snb...forgive my ignorance. Do I use the code you just mentioned alone and in place of the code that royUK made, or is it meant to be used in addition to his code? (I tried using just yours and it did no do anything.)

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing the .ico icon of my excel file?

    I've "borrowed" an icon, put in the same folder as the workbook & amended the code
    Attached Files Attached Files

  15. #15
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    royUK...

    I am sorry for being so dense today. Is it Friday yet? I unzipped the folder and put it on my desktop. What now? Was the excel file icon supposed to mirror the .ico file? It didn't (see attached)...I am sure it is my fault. :-/

    Update: Also...when refering to a file located on the computer that has spaces (such as "FY2011 Timesheet Template"), does one need to use underscores in place of the spaces?
    Attached Images Attached Images
    Last edited by jonvanwyk; 03-29-2011 at 11:07 AM.

  16. #16
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Changing the .ico icon of my excel file?

    After playing around with your guys' code a bit, I managed to get something to work (seen below). I inserted snb's code into the Workbook_BeforeClose command of the "ThisWorkbook" code. The user has to go through all of the folders to get to their timesheet only once, and then it creates the shortcut with the cusomised .ico file when the document is closed. They have to open it the hard way once on each workstation. I am satisifed with this solution.

    Please Login or Register  to view this content.
    Last edited by jonvanwyk; 03-29-2011 at 02:23 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1