+ Reply to Thread
Results 1 to 12 of 12

Converting 2007 VBA color patterns to 2003 color patterns

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Converting 2007 VBA color patterns to 2003 color patterns

    I have some code in Excel 2007 and I want it to be compatable with 2003. How would I go about finding what the similar command is in 2003 which will create similar cell background colors to this
    Please Login or Register  to view this content.
    Is there a website that will give approximate matches?
    Thanks in advance.
    Last edited by ChemistB; 05-18-2011 at 04:58 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Hello ChemistB,

    Are you trying to match 2003 colors to 2007 colors or are you looking for the cell properties in 2003 that correspond to those in 2007?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    I guess I would need both. I realize that 2007 has lots more colors so probably won't get an exact match. I wrote the code in 2007, partially using the macro command, and I want it to be compatable with 2003. If I have to change the colors slightly, that's not a big deal. Thanks

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Hello ChemistB,

    I haven't done this in awhile but you can copy an Excel color palette. If I remember correctly, a file is created. You could then import the file into Excel 2007, unless there have been some major changes. I need to look into it to be sure.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Hello ChemistB,

    Copying the color palette hasn't changed. You can manually copy the Excel 2003 to your Excel 2007 workbook manually.

    Copy a color palette to another workbook

    1. Open the workbook that contains the color palette you want to copy.
    2. Switch to the workbook that you want to copy the color palette to.
    3. On the Tools menu, click Options, and then click the Color tab.
    4. In the Copy colors from box, click the workbook that contains the color palette you want to copy, and then click OK.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    That would work if I had a copy of Excel 2003. I'm thinking if I had 2003, I could simply record a macro with similar colors and see if they transfer directly into 2007.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Hello ChemistB,

    I have created a text file with the Excel 2003 palette. This macro will import the file into the Active Workbook and reset the colors to those in Excel 2003.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Wow, thanks Leith! Will check it out today.

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    I get a compile error (see attachment)
    Attached Files Attached Files

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

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    See the attachment: colors, colorindexes, RGB and Hex:
    Attached Files Attached Files
    Last edited by snb; 05-13-2011 at 09:14 AM.



  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Thanks snb, very helpful as usual. This will be a good file to keep around.

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Converting 2007 VBA color patterns to 2003 color patterns

    Hello ChemistB,

    Not sure why you got that error. The named argument "InitialFileName" is the same in both Excel 2003 and 2007. Did you try reloading and running the macro again?

+ 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