Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color | Charts and Charting in Excel | |||
Can't format cell color/text color in Office Excel 2003 in fil | Excel Discussion (Misc queries) | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions |