Userform Close Button

RoyinUK2000

Board Regular
Joined
Mar 26, 2002
Messages
79
Is it possible to stop a user shutting a userform with the close button.

Thx
Roy
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Do you want it to do something else instead, or just stay on the page and do nothing when it's pressed?
 
Upvote 0
I want it to stay on the sheet and remain active and tell the user that they cannot close it down by pressing the close button

Thx
Roy alias Reg
 
Upvote 0
Mmmkay....

The code you want is:

Private Sub CommandButton1_Click()

MsgBox ("You cannot close this form by pressing the close button")

End Sub
 
Upvote 0
Hmmm.........

Intreging!

I must know, why would you want the user to be stuck on a page only getting told that they cant go anywhere?

Dan.
 
Upvote 0
The user wouldn't get stuck. The userform has 8 commandbuttons on it which move them on, so basically they must press one of the command buttons and not the close button. I only want to stop a user pressing the close button ( The cross in the corner ). Any other command button is fine

Come on someone out there must know the answer

Thax
Roy
 
Upvote 0
Oh THAT close button!! I thought you meant you'd drawn one on there and didn't want people pressing it. I thought that was a bit strange....
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,184
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top