98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Userform in VBA
Userform in VBA
Resolved · Medium Priority · Version 2003
N.b. has attended:
Excel VBA Intro Intermediate course
Userform in VBA
How do you turn off the close button on a UserForm?
RE: Userform in VBA
Hi N.b.
If you place the following code in the form's QueryClose event it will prevent the close button being used to close the form
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End Sub
Hope this helps
Caros
Wed 18 Feb 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Closing Multiple Workbooks quicklyWhen you have several workbooks open in Excel and want to just close them all at once: |