Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default disable or hide the close window icon 'X' in the corner of a userform

any ideas how to achieve that? I'm sure I've seen it somewhere, but can't
find it in past posts.

thanks

tim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default disable or hide the close window icon 'X' in the corner of a userform


This stops the window being closed and shows a msg

James

Private Sub UserForm_QueryClose(Cancel As Integer,
CloseMode As Integer)
If CloseMode = 0 Then
Cancel = True
MsgBox "Please use the Exit button", vbCritical
End If
End Sub


-----Original Message-----
any ideas how to achieve that? I'm sure I've seen it

somewhere, but can't
find it in past posts.

thanks

tim


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default disable or hide the close window icon 'X' in the corner of a userform

Thank you. but to explain a little further, i was trying to remove the
button altogether (or disable it, so clicking has no effect), later code in
the module will close it automatically

thanks
tim


"James" wrote in message
...

This stops the window being closed and shows a msg

James

Private Sub UserForm_QueryClose(Cancel As Integer,
CloseMode As Integer)
If CloseMode = 0 Then
Cancel = True
MsgBox "Please use the Exit button", vbCritical
End If
End Sub


-----Original Message-----
any ideas how to achieve that? I'm sure I've seen it

somewhere, but can't
find it in past posts.

thanks

tim


.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default disable or hide the close window icon 'X' in the corner of a userform

James' method is easiest, but if you want to remove the X, post back.

or go to Stephen Bullen's site and down load formfun.zip from his Excel page

http://www.bmsltd.ie (see menu on the left side of page)

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
any ideas how to achieve that? I'm sure I've seen it somewhere, but can't
find it in past posts.

thanks

tim




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default disable or hide the close window icon 'X' in the corner of a userform

thank you, i got the desired effect using the QueryClose event of the button
(don't know if its the best way though). the button is still there, but
clicking now has no apparent effect.

regards,

tim


"Tom Ogilvy" wrote in message
...
James' method is easiest, but if you want to remove the X, post back.

or go to Stephen Bullen's site and down load formfun.zip from his Excel

page

http://www.bmsltd.ie (see menu on the left side of page)

--
Regards,
Tom Ogilvy

"Tim" wrote in

message
...
any ideas how to achieve that? I'm sure I've seen it somewhere, but

can't
find it in past posts.

thanks

tim






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
Can't get to bottom right corner of window to resize? I figured it Michael NoNOTooMuch Excel Discussion (Misc queries) 1 April 14th 08 11:06 PM
When I close Excel the icon moves Chevin Excel Discussion (Misc queries) 0 February 24th 06 01:50 PM
Remove Close Icon ? Malcolm Excel Programming 5 December 2nd 03 01:27 PM
Removing the little Excel icon in left corner herm Excel Programming 0 November 25th 03 07:06 PM
Disable close button of Modeless Userform RB Smissaert Excel Programming 2 September 13th 03 09:46 PM


All times are GMT +1. The time now is 01:50 AM.

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

About Us

"It's about Microsoft Excel"