A
Alan Stancliff
Here's another VBA question for the Word 2003 macro experts.
Suppose I have a macro like this:
Sub MyWondrousInvention()
Userform_1_FRM.Show
Userform_2_FRM.Show
End Sub
As you can guess, the two items that "Show" are two user forms. The
first user form has a CANCEL button on it, and the code looks like this:
Private Sub ExitCMD_Click()
Userform_1_FRM.Hide
Unload Userform_1_FRM
End Sub
What I would like is that if the first user form exits because the
CANCEL button is pressed, the second user form does not and the
MyWondrousInvention sub is exited without the second step being
activated. But because the click routine is private, I can't figure out
how to make it abort the rest of the sub. I suppose some if-else-then
routine, but how does one do it in this case?
Regards,
Alan Stancliff
Suppose I have a macro like this:
Sub MyWondrousInvention()
Userform_1_FRM.Show
Userform_2_FRM.Show
End Sub
As you can guess, the two items that "Show" are two user forms. The
first user form has a CANCEL button on it, and the code looks like this:
Private Sub ExitCMD_Click()
Userform_1_FRM.Hide
Unload Userform_1_FRM
End Sub
What I would like is that if the first user form exits because the
CANCEL button is pressed, the second user form does not and the
MyWondrousInvention sub is exited without the second step being
activated. But because the click routine is private, I can't figure out
how to make it abort the rest of the sub. I suppose some if-else-then
routine, but how does one do it in this case?
Regards,
Alan Stancliff