Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: visual basic colour codes!

  1. #1
    Guest

    Default

    What is the visual basic code for white I need to know!

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    The ColorIndex for white is 2. Is that what you're talking about? e.g.

    Range("A1").Font.ColorIndex = 2

    You can type ColorIndex Property into VBA help to get a full list.

    HTH,
    D

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    White is VBA 2, try 1 2 3 4 if unsure or check in help files sure its there.

    BTW on old borad there was some guru who posted some code that bacgs out all colours in one column and the number next ! very cool if lasy like me.. i must have it some where but not archived in my knowledge base yet sorry, have a look..


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  4. #4
    Guest

    Default

    I had the VBA Code. (Kept it from an earlier post)

    Sub ColorIndices()
    For i = 1 To 56
    Cells(i, 1).Interior.ColorIndex = i
    Cells(i, 2).Value = i
    Next i
    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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