Closing other subs within a userform
Posted by Sam on August 08, 2001 9:13 AM
I am using a userform that calls a sub within a module. I was wondering if anyone knows how to exit the other sub after the userform is closed.
'(sub angcalc1 is already running under this userform)
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
iYesNo = MsgBox("Are Yo Sure You Want To Close The Angle Calculator?", vbYesNo)
If iYesNo = vbNo Then
Cancel = True
ElseIf iYesNo = vbYes Then
Unload AngCalcForm
MsgBox ("To Exit The Angle Calculator Press Esc")
**** Need To close sub AngCalc1 here but not sure how ******
Sheets(1).Select
Exit Sub
End If
End If
End Sub
Thanks,
Sam