MrExcel Publishing
Your One Stop for Excel Tips & Solutions

close a form without exiting the workbook(quit running MACRO)

Posted by Rob W on September 12, 2001 12:12 PM

i have a form that i am showing once a button is clicked. user clicks a check box if desired or they can press cancel quit the form and stop the macro. I am having trouble with the CANCEL button. How do I close the form and stop running the macro????


Posted by Juan Pablo on September 12, 2001 12:28 PM

In the Cancel_Click() event put something like this:

Private Sub Cancel_Click() 'Or your Cancel button name
Unload me
End Sub

Juan Pablo

Posted by rob on September 12, 2001 12:36 PM

thanks! Youre the man!