Colour Question
Hi Does anyone know what the rgb of the vbbuttonface is please?.
TIA Charles |
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 |
All times are GMT +1. The time now is 05:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com