Welcome toExcel.Tips.Net
Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site
Adding a Little Animation to Your Life
Converting a Range of URLs to Hyperlinks
Making the Formula Bar Persistent
David is using Excel 2000, and has created a splash screen by using a user form in VBA. (How you create user forms has been covered in other issues of ExcelTips.) Like other splash screens, the user form stays visible for a short time, and then disappears. David wants to modify the user form so that the close button (the "X" in the upper-right corner) is not visible and that, preferably, the title bar is not even visible.
There is no direct way to remove the close button from a user form, but it can be done with an API call. You can find additional information on how to do this (it is rather involved) at this Web site created by Stephen Bullen. Scroll most of the way down the page and look for the file called "NoCloseButton.zip."
http://www.bmsltd.ie/Excel/Default.htm
Instead of relying on Windows API calls, you can simply disable the close button so it has no effect. You can do this using this type of code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then
Cancel = True
End If
End Sub
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3167) applies to Microsoft Excel versions: 97 2000 2002 2003 2007
More Power! For some people, the prospect of creating macros can be scary. Those who conquer their fears, however, find they become much more confident and productive once they learn how to make Excel do exactly what they want. ExcelTips: The Macros is an invaluable source for learning Excel macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of ExcelTips. Learn at your own pace, exactly the way you want.