Hello!
I have a large main macro. I would like for the very first thing it does is to call a custom msg box that will ask the user whether or not they wish to exit the macro, or if they wish to continue.
If they wish to exit, I need to exit out of the custom msgbox sub AND also out of the main macro.
If they wish to continue, then I need to leave the custom msgbox and continue through the main macro.
This is what I've cobbled together from several sources:
Case 1 (the "I wish to exit") is button 1 on my form.
Case 2 (the "I wish to continue") is button 2 on my form.
I hope this makes sense to someone. I have my fingers crossed...and I'll eat another cookie as moral support.
-Christine
I have a large main macro. I would like for the very first thing it does is to call a custom msg box that will ask the user whether or not they wish to exit the macro, or if they wish to continue.
If they wish to exit, I need to exit out of the custom msgbox sub AND also out of the main macro.
If they wish to continue, then I need to leave the custom msgbox and continue through the main macro.
This is what I've cobbled together from several sources:
Code:
Sub frmMsgBoxWCE()Dim myForm As frmCustomMsgBox
Set myForm = New frmCustomMsgBox
myForm.Caption = "West Complex Unit E Staff Callout"
myForm.Show
Select Case myForm.Tag
Case 1
GoTo lbl_Exit
Case 2
Exit Sub
End Select
'End If
lbl_Exit:
Unload myForm
Set myForm = Nothing
Exit Sub
End Sub
Case 1 (the "I wish to exit") is button 1 on my form.
Case 2 (the "I wish to continue") is button 2 on my form.
I hope this makes sense to someone. I have my fingers crossed...and I'll eat another cookie as moral support.
-Christine