button on a timer
Change the scope of the button from private to public and then write a
recursive sub to call the button click porcedure. Something like this
'**** In a standard code module
Public Sub PressTheButton()
Application.OnTime Now() + TimeSerial(0, 0, 10), "PressTheButton"
Call Sheets("Sheet1").CommandButton1_Click
End Sub
'**** In the Worksheet
Public Sub CommandButton1_Click()
MsgBox "Tada"
End Sub
--
HTH...
Jim Thomlinson
" wrote:
i'm writting a little something in excel and i need to have a button
(visual basic form type) pressed every 3 minutes...any suggestions?
|