Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Applying Colours
Hi,
I have selected a colour from a cell and would like to use that colour for a shape, however the colour is not the same- am I applying the colour in the wrong format? Retrieving the colour via: SelectedColour = Range("Time_Colour").Interior.ColorIndex And applying the color via: Selection.ShapeRange.Fill.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Line.Visible = msoTrue Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Applying Colours
Add 7 to the colorindex to set the same schemecolor.
eg ..SchemeColor = SelectedColour + 7 Regards, Peter T "Sanjay" wrote in message ... Hi, I have selected a colour from a cell and would like to use that colour for a shape, however the colour is not the same- am I applying the colour in the wrong format? Retrieving the colour via: SelectedColour = Range("Time_Colour").Interior.ColorIndex And applying the color via: Selection.ShapeRange.Fill.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Line.Visible = msoTrue Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Applying Colours
Sanjay:
Try replacing SelectedColour = Range("Time_Colour").Interior.ColorIndex with SelectedColour = Range("Time_Colour").Interior.Color -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Sanjay" wrote: Hi, I have selected a colour from a cell and would like to use that colour for a shape, however the colour is not the same- am I applying the colour in the wrong format? Retrieving the colour via: SelectedColour = Range("Time_Colour").Interior.ColorIndex And applying the color via: Selection.ShapeRange.Fill.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Line.Visible = msoTrue Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Applying Colours
Thanks Peter that's great !
Regards, "Peter T" <peter_t@discussions wrote in message ... Add 7 to the colorindex to set the same schemecolor. eg .SchemeColor = SelectedColour + 7 Regards, Peter T "Sanjay" wrote in message ... Hi, I have selected a colour from a cell and would like to use that colour for a shape, however the colour is not the same- am I applying the colour in the wrong format? Retrieving the colour via: SelectedColour = Range("Time_Colour").Interior.ColorIndex And applying the color via: Selection.ShapeRange.Fill.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.ForeColor.SchemeColor = SelectedColour Selection.ShapeRange.Line.Visible = msoTrue Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I customise colours used in charts and keep those colours. | Charts and Charting in Excel | |||
How to save one of the MORE COLOURS in the THEME COLOURS? | Excel Discussion (Misc queries) | |||
Applying functions to colours | Excel Discussion (Misc queries) | |||
Excel 2003 font colours and cell colours | Excel Discussion (Misc queries) | |||
Applying formulae | Excel Programming |