Private Declare Function SendMessage _
Lib "user32" _
Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long
Private Const WM_USER = &H400 '1024
Private Const CCM_FIRST As Long = &H2000&
Private Const CCM_SETBKCOLOR As Long = (CCM_FIRST + 1)
'// set progressbar backcolor in IE3 or later
Private Const PBM_SETBKCOLOR As Long = CCM_SETBKCOLOR
'//set progressbar barcolor in IE4 or later
Private Const PBM_SETBARCOLOR As Long = (WM_USER + 9)
Private Sub SetProgressBarColour(hwndProgBar As Long, ByVal ClrRef As Long)
Call SendMessage(hwndProgBar, PBM_SETBARCOLOR, 0&, ByVal ClrRef)
End Sub
Private Sub SetProgressBackColour(hwndProgBar As Long, ByVal ClrRef As Long)
Call SendMessage(hwndProgBar, PBM_SETBKCOLOR, 0&, ByVal ClrRef)
End Sub
This ActiveX control has a Handle property so............
To set the colours use the send a msg to the progressbar like this
Dim Pbarhwnd As Long
'// Assuming name is Progressbar1
Pbarhwnd = ProgressBar1.hwnd
SetProgressBarColour Pbarhwnd, RGB(205, 205, 0)
SetProgressBackColour Pbarhwnd, RGB(0,0,0)