Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I couldn't get the OLEObjects from the Forms tool bar to work, but using the
Controls Toolbox button, this syntax works. Sub btnClr() Worksheets(1).CommandButton1.BackColor = RGB(0, 255, 255) ' MsgBox ("") s = Timer + 2 Do While Timer < s DoEvents Loop Worksheets(1).CommandButton1.BackColor = RGB(255, 100, 255) End Sub "Bert" wrote: The following code (in Excel 2003) changes a command button's color, then pauses for a couple of seconds, and changes the color again. The problem is the change BEFORE the loop never displays. Is there something else I should be doing to make this work? (IF I comment out the delay loop and use the msgbox, the first color change shows just fine.) Worksheets(2).OLEObjects.Item(BtnNo).Object.BackCo lor = Red ' MsgBox ("") x = Timer + 2 Do Loop Until Timer x Worksheets(2).OLEObjects.Item(BtnNo).Object.BackCo lor = Gray Thanks for any suggestions. Bert. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop Unitl with timer | Excel Programming | |||
Stopping a Timer / Running a timer simultaneously on Excel | Excel Discussion (Misc queries) | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
help needed with timer / loop | Excel Programming | |||
API Timer Problem | Excel Programming |