In your activate event:
Private Sub UserForm_Activate()
CommandButton1.BackColor = 4966415
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waittime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waittime
CommandButton1.BackColor = 4966555
Application.ScreenUpdating = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waittime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waittime
CommandButton1.BackColor = 3966555
Application.ScreenUpdating = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waittime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waittime
CommandButton1.BackColor = 2966555
Application.ScreenUpdating = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waittime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waittime
CommandButton1.BackColor = 4566555
Application.ScreenUpdating = True
End Sub
I know it looks difficult, you just need to find the colors you want and
change the number of the color, any further question please aske me, I made
this fast, but with some time you can make this in 4 or 5 lines (with for
statements)
HTH
Pierre via OfficeKB.com said:
hi filo666
Thanks for the help but do you have some vba code for me please ?
Thanks,
Pierre
use the wait ant the backcolor propierties
[quoted text clipped - 4 lines]