![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: East Texas
Posts: 38
|
Is There any way to disable the Close “X” button on a userform.
Thanks in advance |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
I asked the very same question myself a while ago. Jackeb and Sbirro Cornuto kindly obliged...
http://www.mrexcel.com/board/viewtop...c=3439&forum=2 |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
This code will disable the close button and will actually "grey" it out to show that's disabled:
HTH |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: East Texas
Posts: 38
|
Thanks for the quick reponse. This has got to be the best board around. Hope one day to be able to help.
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Jul 2002
Posts: 41
|
Mark, WHERE do I have to place your code. I don't understand the meaning of UserForm. Do I have to use a button? I want also to grey the x-button but only when a condition is true. How do I have to do this?
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Gandalf, welcome to the board.
If you don't know what a Userform is, then I'm assuming that you want to grey out one of the "X" buttons in Excel itself? Either for the Workbook, or for the Excel application? Is this correct? |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
To disable the close button in Excel you can use this code plus the "test" procedure to check it:
As soon as someone tells me what the Classname is for a worksheet, we can disable that little bugger as well. HTH |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|