View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Garman Steve Garman is offline
external usenet poster
 
Posts: 107
Default What is the RGB value of the colour of Excel's scroll bars

It appears to be 236,233,216

I found this by putting a scrollbar on a userform and running the sub
test, which I've reproduced below in case you need to check other colours.

Private Declare Function TranslateColor Lib "olepro32.dll" _
Alias "OleTranslateColor" (ByVal clr As OLE_COLOR, _
ByVal palet As Long, col As Long) As Long

Sub test()
Dim RealColor As Long, test As OLE_COLOR
test = UserForm1.ScrollBar1.BackColor
TranslateColor test, 0, RealColor
MsgBox "The backcolor of this form is R=" & _
CStr(RealColor And &HFF&) & " G=" & _
CStr((RealColor And &HFF00&) / 2 ^ 8) & _
" B=" + CStr((RealColor And &HFF0000) / 2 ^ 16)
End Sub



Charles Jordan wrote:
Hi NG. We have surrounded an Excel scroll bar with cells coloured grey
(RGB(240,240,240) - but it's not a precise match. Does any on know the
RGB value of the scroll bars ?

Thanks Charles