Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default remove close button

easier is to use the queryclose event to control the closing of the form:

Private Sub UserForm_QueryClose(cancel As Integer, closemode As Integer)

here are the possible values for the closemode argument

vbFormControlMenu
0
The user has chosen the Close command from the Control menu on the
UserForm.

vbFormCode
1
The Unload statement is invoked from code.

vbAppWindows
2
The current Windows operating environment session is ending.

vbAppTaskManager
3
The Windows Task Manager is closing the application.


From the closemode argument, you can test why the form is being closed - if
you disagree, you can set Cancel = True and display a warning message - for
example if closemode = vbFormControlMenu. If it is one of the other
options, you might perform some cleanup and then let the form close.

--
Regards,
Tom Ogilvy


"Josh Ashcraft" wrote in message
...
how do i remove the close button (X) from the top of a
userform?

Thanks,
Josh



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
close button does not close goplayoutside Excel Discussion (Misc queries) 1 October 11th 05 03:42 PM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM
excel - Windows close button (x) should only close active workboo. CoffeeAdict Setting up and Configuration of Excel 3 February 8th 05 04:30 AM
remove close button Ron de Bruin Excel Programming 0 August 19th 03 04:12 PM
remove close button Dan E[_2_] Excel Programming 0 August 19th 03 04:10 PM


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