+ Reply to Thread
Results 1 to 9 of 9

VBA for color index 192

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    715

    VBA for color index 192

    Hi,

    128 is VBA color index code for dark red. I know Index 9, but 192 is slight different red.

    How can I fit that into below VBA?

    Please Login or Register  to view this content.
    When I change to 192, I get below error msg

    Run-Time error '9':
    Subscript out of Range.

    Regards,
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA for color index 192

    maybe ....Interior.Color = 192

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    715

    Re: VBA for color index 192

    nice..

    and how to add or make font color changes to white in the same cell??

    Regards,

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,440

    Re: VBA for color index 192

    128 is RGB code for a shade of Red

    Please Login or Register  to view this content.
    ColorIndex values are 0 to 57 are maps to the old colour pallete in xl2003.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    715

    Re: VBA for color index 192

    oh.. got it

    Thanks!!

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA for color index 192

    .....Font.Color = vbWhite

  7. #7
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    715

    Re: VBA for color index 192

    Thanks a ton..

    Reps added.
    Regards

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA for color index 192

    You can use the index for the font.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    715

    Re: VBA for color index 192

    Thanks John!

    Regards,

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Color Index to sum up cells based on background color
    By jph89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2013, 03:23 PM
  2. Set cell background color by color index
    By Ms Bean in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-27-2013, 03:17 AM
  3. [SOLVED] fr default color index, need color #
    By Janis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2006, 06:15 PM
  4. Replies: 6
    Last Post: 12-02-2005, 07:55 PM
  5. [SOLVED] Color Index
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-19-2005, 02:05 PM

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