Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How can I get RGB color values?

mycolor = ActiveCell.Offset(0, 1).Interior.Color
ActiveCell.Value = mycolor

The above code gives me the integer color values (which I don't understand)
for the cell to the right of the active cell and the following code gives me
the color palette numbers:

mycolor = ActiveCell.Offset(0, 1).Interior.ColorIndex
ActiveCell.Value = mycolor

How can I get the RGB color values


Any info gratefully appreciated

Philip


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How can I get RGB color values?

Philip,

See www.cpearson.com/excel/colors.htm for VBA code to break the
Long color value in to its red, green, and blue components.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Philip Reece-Heal" wrote in
message . ..
mycolor = ActiveCell.Offset(0, 1).Interior.Color
ActiveCell.Value = mycolor

The above code gives me the integer color values (which I don't

understand)
for the cell to the right of the active cell and the following

code gives me
the color palette numbers:

mycolor = ActiveCell.Offset(0, 1).Interior.ColorIndex
ActiveCell.Value = mycolor

How can I get the RGB color values


Any info gratefully appreciated

Philip




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default How can I get RGB color values?

Phillip,

Just about everything you wanted to know about colors:
http://www.mvps.org/dmcritchie/excel/colors.htm

John

Philip Reece-Heal wrote:

mycolor = ActiveCell.Offset(0, 1).Interior.Color
ActiveCell.Value = mycolor

The above code gives me the integer color values (which I don't understand)
for the cell to the right of the active cell and the following code gives me
the color palette numbers:

mycolor = ActiveCell.Offset(0, 1).Interior.ColorIndex
ActiveCell.Value = mycolor

How can I get the RGB color values

Any info gratefully appreciated

Philip


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default How can I get RGB color values?

Phillip,

Well, almost everything.
Forgot to mention Chip's site too

John

John Wilson wrote:

Phillip,

Just about everything you wanted to know about colors:
http://www.mvps.org/dmcritchie/excel/colors.htm

John

Philip Reece-Heal wrote:

mycolor = ActiveCell.Offset(0, 1).Interior.Color
ActiveCell.Value = mycolor

The above code gives me the integer color values (which I don't understand)
for the cell to the right of the active cell and the following code gives me
the color palette numbers:

mycolor = ActiveCell.Offset(0, 1).Interior.ColorIndex
ActiveCell.Value = mycolor

How can I get the RGB color values

Any info gratefully appreciated

Philip


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How can I get RGB color values?



Many thanks John
Plenty of stuff to get me to where I was wanting to go

All the best
Philip

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I get RGB color values?



Many thanks Chip
Plenty of stuff to get me to where I was wanting to go and some way
further

All the best
Philip

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I sum up values only in cells that are color filled? TryingExcel Excel Worksheet Functions 7 April 12th 09 03:34 PM
Find Values in Range Then Color Cue Excel Discussion (Misc queries) 2 October 13th 08 01:58 PM
Sum function when the values in an xls are color coded Angeles Excel Worksheet Functions 2 May 29th 08 03:55 PM
Category color changes when changing values. JanSr Charts and Charting in Excel 0 July 11th 07 09:40 AM
Neg Values in Chart with Diff Color? Will Excel Discussion (Misc queries) 1 December 13th 06 06:06 PM


All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"