|
-
Feb 6th, 2000, 11:42 PM
#1
Thread Starter
Addicted Member
What is the way to make multiple instructions happen in order, from a Command1_Click()?
I was earlier suggested that I use a timer, yet Im not so sure that, that is proper. What would YOU do to have three instructions take place in ORDER, after a command1_click()?
(It's got to be in order not all at once.)
Many thank you's to ya,
Daniel Christie
-
Feb 6th, 2000, 11:49 PM
#2
Hyperactive Member
UUHmmmmmmm.............
Code:
Private Sub Do_Something1()
' do something
End Sub
Private Sub Do_Something2()
' do something
End Sub
Private Sub Do_Something3()
' do something
End Sub
Private Sub cmdGoDoSomething_Click()
Call Do_Something1
Call Do_Something2
Call Do_Something3
End Sub
Maybe I don't understand what you ask... but this code runs 3 functions when you click the cmd button...
-
Feb 7th, 2000, 12:53 PM
#3
I also saw your previous post and I don't know why you say that you have things happen "all at once". Normal Vb is single-threaded. What that means is that it's not possible for more than one thing to happen at the same time. If you have for example the following three lines of code in your Command1_Click event...
Code:
Private Sub Command1_Click()
Dim intMyVal As Integer
intMyVal = 3
intMyVal = intMyVal * intMyVal
MsgBox intMyVal
End Sub
..."9" will be displayed, and that can only happen if the lines are executed in order. If you want more help, please post the code that you are having a problem with, and describe why you think the lines are not being executed in order.
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
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
|