|
-
Mar 20th, 2000, 08:40 PM
#1
Thread Starter
Junior Member
I desperately need some help with this problem I have.
The scenario is:-
- there are 2 forms - frmOne and frmTwo
- frmOne is the main form & frmOne calls frmTwo when needed
- frmTwo requires the user to input a string
Now, when a button is clicked in frmOne, some code is executed and frmTwo is called. However, there is more code in Button_Click (of frmOne) after frmTwo is loaded. I need to somehow pause this code after frmTwo is loaded. I want the user to input the string in frmTwo and when frmTwo is unloaded, I want the remaining code in Button_Click (in frmOne) to continue executing. Below is what I mean.
'In frmOne
Private Sub Button_Click()
Code
Code
Code
frmTwo.Show ' Load and display frmTwo while
frmOne.Hide ' frmOne is temporarily hidden
Code } I would like to stop this
Code } code from being executed until
Code } frmTwo is unloaded and frmOne gets control.
End Sub
'In frmTwo
Private Sub Ok_Click()
frmOne.Tag = txtName.Value
frmOne.Show
Unload frmTwo
End Sub
Is there anyway I can pause the remaining code and stop it from executing until frmTwo gets the string from the user and returns the control to frmOne.
Please help.
For background info, the situation is such that I could use InputBox() but I do not want the Cancel button to be there. So, I have made a simple form with a textbox and an Ok button. This is frmTwo.
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
|