+ Reply to Thread
Results 1 to 3 of 3

"iColor" and "ColorIndex" in vba

  1. #1
    Registered User
    Join Date
    07-20-2006
    Posts
    1

    "iColor" and "ColorIndex" in vba

    Hello All,

    The following vba code operates as designed, i.e., it randomly assigns fill colors by row based on criteria changes in Column C of my data set. That’s what I want. However, I’m seeing that some of the fill colors are much too dark which causes the text to be almost unreadable. I did some research, and it looks to me that there is a 56-color palette and a 256-color palette.

    1. Is it possible to select my own specific array of palette colors, mostly in pastels, by inserting specific color numbers in the vba code? As in “iColor” or “ColorIndex” (I don’t know the difference). For example, light magenta has a hexadecimal value of #FF99CC and an RGB sequence of R=255; G=153; B=204. (I might choose eight or so LIGHTER FILL color choices)

    2. Assuming this is possible, be kind enough to supply concise and detailed instructions as my vba skills are limited to using not constructing code.

    Thanks,

    Bill in Denver


    Please Login or Register  to view this content.
    Last edited by rylo; 05-17-2009 at 09:46 PM. Reason: insert code tags

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: "iColor" and "ColorIndex" in vba

    Welcome to the forum.

    Except for Excel 2007, you have a 56-color palette. You can change the colors via Tools > Options > Color.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    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: "iColor" and "ColorIndex" in vba

    Hello bill_in_denver,

    Here are a couple of links you may find useful...

    How to Display Any Color in Excel

    How to Change the Color Palette for Excel Workbooks
    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!)

+ 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