Hi everyone,
I have a piece of code which (highly simplified) looks like this:
This code displays a form (myform) with a couple of buttons, which when pressed display other forms of their own (mysecondform and mythirdform)
The code for myform is simply this:
What I want is for mysecondform and mythirdform to appear without myform being hidden. So if, for example, I clicked a Cancel button on mysecondform (which would hide it), myform would still be displayed. However, when I try stripping out the "Hide" method from the above code, the buttons don't work.
It seems as if hiding the form is necessary for mySub to continue running its code (and thus do the Select Case stuff). A workaround would be to put mysecondform.Show into the code of ShowMySecondForm_Click, etc, but for reasons I won't go into, I can't do this.
So is there any way to get around this? Or have I backed myself into a corner?
Thanks!
I have a piece of code which (highly simplified) looks like this:
Code:
Sub mySub()
myform.Show
Select Case myform.Tag
Case 1
mysecondform.Show
Case 2
mythirdform.Show
End Select
End Sub
The code for myform is simply this:
Code:
Private Sub ShowMySecondForm_Click()
Tag = 1
Hide
End Sub
Private Sub ShowMyThirdForm_Click()
Tag = 2
Hide
End Sub
It seems as if hiding the form is necessary for mySub to continue running its code (and thus do the Select Case stuff). A workaround would be to put mysecondform.Show into the code of ShowMySecondForm_Click, etc, but for reasons I won't go into, I can't do this.
So is there any way to get around this? Or have I backed myself into a corner?
Thanks!