LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Removing a control

On Oct 8, 6:45 pm, Mekinnik
wrote:
How do I remove the close control from the upper right corner of my user form?


While it is possible to remove the control completely via API calls
and such, it is much easier to just capture the event when the user
clicks on the close button and handle it.
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
MsgBox "Hey, don't do that!!!!"
Cancel = True
End If
End Sub

 
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
Add-In Toolbar Control - Removing The Toolbar Question Dreiding Excel Programming 10 October 5th 07 06:39 PM
Removing hyperlink without removing the font settings /border sett San Excel Programming 2 September 27th 07 04:37 PM
Removing patterns without removing gridlines pennyb9 Excel Discussion (Misc queries) 1 July 11th 07 02:43 AM
Removing calendar control Rob Excel Discussion (Misc queries) 0 August 4th 06 01:57 AM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


All times are GMT +1. The time now is 03:55 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"