HOW to close a userform using a button

C

CC

To close a userform I wrote

Private Sub XX_Click()
UserForm.Close
End Sub

but don't Close the form I get the a error message " invallide qualifier "

HOW to close a userform using a button ?
 
D

Dave Peterson

This is a control (like a button) on that userform that you want to close:

Private Sub XX_Click()
unload me
End Sub

Me is the userform that owns the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top