#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Excel Color

How can I make a Rectangle or TextBox the same color as what Excel uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Excel Color

check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Excel Color

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Excel Color

What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS uses in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Excel Color

don't know, try tools/options/colors modify/custom and see if you can match
it

--


Gary


"Ronbo" wrote in message
...
What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS uses
in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel
uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Excel Color

Ronbo,
You mean the System colours ?
That would depend on the colour scheme the user has selected.
Check out the SystemColorConstants in the Object browser.

NickHK

"Ronbo" wrote in message
...
What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS uses

in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel

uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Excel Color

Thanks for the replies.

Gary, that is what I am trying to do, but I don't know the color scheme that
MS uses for boxes, toolbars, etc.

Nick, if it is not through "Format AutoShape" how do I get to
SystemColorConstants in the Object browser and will it give me the color
schemes use by MS that I am using, that I believe is the defult scheme.

"NickHK" wrote:

Ronbo,
You mean the System colours ?
That would depend on the colour scheme the user has selected.
Check out the SystemColorConstants in the Object browser.

NickHK

"Ronbo" wrote in message
...
What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS uses

in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what Excel

uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Excel Color

Ronbo,
AFAIK, you cannot do it manually, it would require some VBA.

Whilst this compiles and appears to work, it does not:
Private Declare Function GetSysColor Lib "user32" _
(ByVal nIndex As Long) _
As Long

Private Sub CommandButton1_Click()
Dim sh As Shape
Set sh = ActiveSheet.Shapes(1)
With sh
.Fill.ForeColor.RGB = GetSysColor(vbActiveTitleBar)
.Line.ForeColor.RGB = GetSysColor(vbActiveBorder)
End With
End Sub

?clng(vbActiveBorder)
-2147483638

However, according to All API, ACTIVEBORDER = 10, which works.
But you can just define your own constants for the correct values of the
various windows elements and use them intead.

So, in the end I am not sure how these SystemColorConstants map to the
numbers required by GetSysColor, or how to use them.

NickHK

"Ronbo" wrote in message
...
Thanks for the replies.

Gary, that is what I am trying to do, but I don't know the color scheme

that
MS uses for boxes, toolbars, etc.

Nick, if it is not through "Format AutoShape" how do I get to
SystemColorConstants in the Object browser and will it give me the color
schemes use by MS that I am using, that I believe is the defult scheme.

"NickHK" wrote:

Ronbo,
You mean the System colours ?
That would depend on the colour scheme the user has selected.
Check out the SystemColorConstants in the Object browser.

NickHK

"Ronbo" wrote in message
...
What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS

uses
in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what

Excel
uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards








  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel Color

You can get the system colour constants by looking at the say the backcolor
property dropdown of a control, or a userform perhaps. Then add to 2^31 for
use in the GetSysColor API

Private Declare Function GetSysColor Lib "user32" _
(ByVal nIndex As Long) As Long

Sub test()
Dim mySysColour As Long

mySysColour = 2 ^ 31 + &H8000000A 'Activeborder

MsgBox vbActiveBorder & vbCr & &H8000000A & vbCr & mySysColour

'with a shape selected
Selection.ShapeRange.Fill.ForeColor.RGB = GetSysColor(mySysColour)

End Sub

But simpler to use the provided vb constants like vbActiveBorder as NickHK
suggested.

Regards,
Peter T


"Ronbo" wrote in message
...
Thanks for the replies.

Gary, that is what I am trying to do, but I don't know the color scheme

that
MS uses for boxes, toolbars, etc.

Nick, if it is not through "Format AutoShape" how do I get to
SystemColorConstants in the Object browser and will it give me the color
schemes use by MS that I am using, that I believe is the defult scheme.

"NickHK" wrote:

Ronbo,
You mean the System colours ?
That would depend on the colour scheme the user has selected.
Check out the SystemColorConstants in the Object browser.

NickHK

"Ronbo" wrote in message
...
What I need is the Hue:, Sat:, Lum:, red:, Green:, Blue values thatMS

uses
in
their boxes, toolbars, etc.

"Ronbo" wrote:

Any ideas as where to find the answer in all of this info?


check out this site
http://www.mvps.org/dmcritchie/excel/colors.htm

--


Gary


"Ronbo" wrote in message
...
How can I make a Rectangle or TextBox the same color as what

Excel
uses in
their toolbars and boxes... which is a light tan.

Going to properties and color, I find nothing like it.

So, how do I get the MS color for a TextBox?

As always, any help is appreciated.

Regards








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
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color mikewillnot Charts and Charting in Excel 1 February 26th 08 05:22 PM
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM
Excel 2003 will not display color fonts or color fill cells DaveC Excel Worksheet Functions 1 April 11th 05 04:38 PM


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

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

About Us

"It's about Microsoft Excel"