Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get the error:
"Object doesn't support this property or method" for the Call Sheets("Sheet1").CommandButton1_Click help! Jim Thomlinson wrote: 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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That exact code works for me. Did you rememeber to change the scope of the
click procedure? 'Note the key word Public (not Private) Public Sub CommandButton1_Click() -- HTH... Jim Thomlinson " wrote: I get the error: "Object doesn't support this property or method" for the Call Sheets("Sheet1").CommandButton1_Click help! Jim Thomlinson wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Timer | Excel Discussion (Misc queries) | |||
Stopping a Timer / Running a timer simultaneously on Excel | Excel Discussion (Misc queries) | |||
Timer | Excel Programming | |||
Timer | Excel Programming | |||
Timer | Excel Programming |