Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
IS it possible to program a button to do something simple, such as
input a "1" into cell A1 but 10 seconds after the button is pressed. I'm looking for something like: Private Sub CommandButton1_Click() "10 seconds timer" (and then) Range("a1") = 1 end sub Cheers, Craig -- The Zero ST |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is quite easy. Just have your buttton code schedule an OnTime routine to
perform the action. See: http://www.cpearson.com/excel/OnTime.aspx -- Gary''s Student - gsnu200738 "Craig Coope" wrote: IS it possible to program a button to do something simple, such as input a "1" into cell A1 but 10 seconds after the button is pressed. I'm looking for something like: Private Sub CommandButton1_Click() "10 seconds timer" (and then) Range("a1") = 1 end sub Cheers, Craig -- The Zero ST |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Experiment with
For j=1 to 10000 ' do nothing Next j Try bigger/smaller values for 10000. But be aware the delay will not be the same on all machines. best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Craig Coope" wrote in message ... IS it possible to program a button to do something simple, such as input a "1" into cell A1 but 10 seconds after the button is pressed. I'm looking for something like: Private Sub CommandButton1_Click() "10 seconds timer" (and then) Range("a1") = 1 end sub Cheers, Craig -- The Zero ST |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or maybe:
application.wait now + timeserial(0,0,10) The program just sits there and does nothing for 10 seconds. Craig Coope wrote: IS it possible to program a button to do something simple, such as input a "1" into cell A1 but 10 seconds after the button is pressed. I'm looking for something like: Private Sub CommandButton1_Click() "10 seconds timer" (and then) Range("a1") = 1 end sub Cheers, Craig -- The Zero ST -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What Instruction? | Excel Discussion (Misc queries) | |||
How do I delete an instruction box? | Excel Worksheet Functions | |||
LeftFooterPicture instruction does not appear to work | Excel Programming | |||
BAR CODE Instruction | Excel Programming | |||
The 'clear' instruction in VBA | Excel Programming |