Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Colour Question

Hi Does anyone know what the rgb of the vbbuttonface is please?.
TIA
Charles
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Colour Question

Hi Charles,

It's a system colour, and system dependent (obviously!). You can return
these with the GetSysColor API. Normally the index's are fed as constants in
the range 0 to 20+ (a few gaps in the 20's depending on window's version).
However to save looking them up -

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

Sub test()
Dim c As Long, n As Long
n = 2 ^ 31 + vbButtonFace ' 15
c = GetSysColor(n)

With ActiveSheet.Shapes.AddShape(1, 10, 10, 100, 100)
.Fill.ForeColor.RGB = c
End With

End Sub

Regards,
Peter T


"vqthomf" wrote in message
...
Hi Does anyone know what the rgb of the vbbuttonface is please?.
TIA
Charles



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 can colour of cell shading be fixed to one colour Tabrez Excel Discussion (Misc queries) 2 September 23rd 08 04:55 PM
colour rows alternating colour Grd Excel Discussion (Misc queries) 6 November 13th 07 10:48 PM
How do I save new colour schemes for graphs in the colour template Alison Charts and Charting in Excel 1 July 22nd 06 10:35 PM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Text in Blue colour, but print in black colour wuwu Excel Worksheet Functions 1 November 13th 04 02:36 PM


All times are GMT +1. The time now is 08:44 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"