+ Reply to Thread
Results 1 to 4 of 4

Get RGB color ?

  1. #1
    SpookiePower
    Guest

    Get RGB color ?

    I have found a color in the color palette that I will use to color some cells.
    But how do I find the RGB numbers for the color so I can use it in VBA ?


    --
    Mit fotoalbum
    www.photo.activewebsite.dk



  2. #2
    SpookiePower
    Guest

    Re: Get RGB color ?

    It is one of the standard colors that i want the RGB numbers on



  3. #3
    Tom Ogilvy
    Guest

    Re: Get RGB color ?

    Color a cell manually and query the interior.color property.

    ? activecell.Interior.Color

    --
    Regards,
    Tom Ogilvy

    "SpookiePower" <boxjunk2600@gmail.com> wrote in message
    news:43ca4adf$0$78283$157c6196@dreader1.cybercity.dk...
    > It is one of the standard colors that i want the RGB numbers on
    >
    >




  4. #4
    chijanzen
    Guest

    Re: Get RGB color ?

    SpookiePower:

    try, Get Activecell.Interior.Color

    Dim R As Integer
    Dim G As Integer
    Dim B As Integer
    Dim RGB As Long
    RGB = ActiveCell.Interior.Color
    R = RGB And 255
    G = RGB \ 256 And 255
    B = RGB \ 256 ^ 2 And 255
    GetRGB = R & "," & G & "," & B
    MsgBox GetRGB

    --
    天行健,君*以自強不息
    地勢坤,君*以厚德載物

    http://www.vba.com.tw/plog/


    "SpookiePower" wrote:

    > It is one of the standard colors that i want the RGB numbers on
    >
    >
    >


+ 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