PC Review


Reply
Thread Tools Rate Thread

Applying Colours

 
 
Sanjay
Guest
Posts: n/a
 
      10th Dec 2006
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      10th Dec 2006
Add 7 to the colorindex to set the same schemecolor.

eg
..SchemeColor = SelectedColour + 7

Regards,
Peter T

"Sanjay" <(E-Mail Removed)> wrote in message
news:#MRTPV$(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?TWFydGluIEZpc2hsb2Nr?=
Guest
Posts: n/a
 
      10th Dec 2006
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!
>
>
>
>

 
Reply With Quote
 
Sanjay
Guest
Posts: n/a
 
      10th Dec 2006
Thanks Peter that's great !

Regards,

"Peter T" <peter_t@discussions> wrote in message
news:umkWpp$(E-Mail Removed)...
> Add 7 to the colorindex to set the same schemecolor.
>
> eg
> .SchemeColor = SelectedColour + 7
>
> Regards,
> Peter T
>
> "Sanjay" <(E-Mail Removed)> wrote in message
> news:#MRTPV$(E-Mail Removed)...
>> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doughnut legend colours do not match chart data point colours Keith Tatman Microsoft Powerpoint 2 20th Sep 2009 08:42 PM
Applying functions to colours =?Utf-8?B?a2lwcGVycw==?= Microsoft Excel Misc 2 9th May 2007 09:03 PM
can I diferentiate categories in Outlook by applying colours? how =?Utf-8?B?RXNzVGVl?= Microsoft Outlook Contacts 0 30th Sep 2005 12:58 AM
Excel 2003 font colours and cell colours =?Utf-8?B?YnJldHRh?= Microsoft Excel Misc 1 17th Apr 2005 03:45 AM
Applying colours to highlight incoming emails ? Stuart Mackie [MCP, MSP] Microsoft Outlook Discussion 4 18th Dec 2003 12:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:52 PM.