Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Disable Exit button on a UserForm

HI
Is there a way to Remove the exit button (X) from the UserForm as I only
want the form to close if the command buttons are selected.

Thanks
Noemi
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 227
Default Disable Exit button on a UserForm

Ron de Bruin posted the following to a similar question:

Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
' Prevents use of the Close button
If CloseMode = vbFormControlMenu Then
MsgBox "Clicking the Close button does not work."
Cancel = True
End If
End Sub

This doesn't remove the Close (what you called Exit) button, but
disables it. I haven't tested it, but I suspect that if you remove the
MsgBox line the Close button will simply not work.

Noemi wrote:
HI
Is there a way to Remove the exit button (X) from the UserForm as I only
want the form to close if the command buttons are selected.

Thanks
Noemi


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use the Merge & Center Button with unprotected Cells - sheet prote Dennis Cantellops Setting up and Configuration of Excel 1 September 22nd 06 12:49 AM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Userform problem (Listindex) jgmiddel Excel Discussion (Misc queries) 1 April 26th 06 01:34 PM
Insert Options button doesn't disappear Seraph Excel Discussion (Misc queries) 0 April 25th 06 02:09 PM
Add a button to a sheet to open a userform PokerZan Excel Discussion (Misc queries) 1 June 17th 05 11:55 PM


All times are GMT +1. The time now is 10:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"