Mar 15th, 2009, 01:34 PM
#1
Thread Starter
Member
Using A Command Button To Click Other Command Buttons using a time
hello guys...
i have a problem
i have 5 command button
Command01
Command02
Command03
Command04
Command05
i want when i press Command01, automatically
run Command02, in 5 second,
then after 5 second click Command03
then after 5 second click Command04
then after 5 second click Command05
can anybody help me in it...
best regs
Mar 15th, 2009, 01:49 PM
#2
Hyperactive Member
Re: Using A Command Button To Click Other Command Buttons using a time
First, make your command buttons a control array. So they become Command1(0), Command1(1), Command1(2) etc.
In your form's declaration section declare a variable to be used as a counter. Such as dim MyCounter as integer
Set your timer control for 5 seconds (5000 ms)
Your Command1(0) event should be to enable the timer.
In your timer event, have it increment the counter, then click the command button for that counter.
MyCounter=MyCounter+1
Command1(Mycounter)_Click
if MyCounter=4 then timer1.enabled=false
This should get you started.
Mar 16th, 2009, 02:51 AM
#3
Thread Starter
Member
Re: Using A Command Button To Click Other Command Buttons using a time
bro... i dnt want to create a arrey
so can u tel me another way i can do it..
Mar 16th, 2009, 02:55 AM
#4
Lively Member
Re: Using A Command Button To Click Other Command Buttons using a time
then create a function that contains the each command code
then call them, done!
Discovery consists in seeing what everybody else has seen and thinking what nobody else has thought.
- Albert Szent-Gy-rgi
Mar 16th, 2009, 03:55 AM
#5
Thread Starter
Member
Re: Using A Command Button To Click Other Command Buttons using a time
creek i dnt get what u said...
can u explain it lill more....
Mar 16th, 2009, 04:07 AM
#6
Lively Member
Re: Using A Command Button To Click Other Command Buttons using a time
look at this i hope you get the logic
Attached Files
Last edited by creek16; Mar 16th, 2009 at 04:16 AM .
Discovery consists in seeing what everybody else has seen and thinking what nobody else has thought.
- Albert Szent-Gy-rgi
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width