Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
how do i disable the close button on my userform?
or can i just remove it? and when the user clicks cancel... is there a way to direct the user back to sheet1 ? Cheers -- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
Hi,
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then ' make user do what you want" Cancel = True End If End Sub HTH |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
where do i put this code?
-- "Carim" wrote: Hi, Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then ' make user do what you want" Cancel = True End If End Sub HTH |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
On Dec 14, 2:32 pm, Moh wrote:
where do i put this code? -- "Carim" wrote: Hi, Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then ' make user do what you want" Cancel = True End If End Sub HTH- Hide quoted text - - Show quoted text - Hi Double click your form and paste it in (the code module behind the form) regards Paul |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
Open your form, hit F7 and copy code ...
|
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
where do i put this code?
In the UserForm's code module. Hth, Merjet |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
it doesn't work
pls help further -- " wrote: On Dec 14, 2:32 pm, Moh wrote: where do i put this code? -- "Carim" wrote: Hi, Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then ' make user do what you want" Cancel = True End If End Sub HTH- Hide quoted text - - Show quoted text - Hi Double click your form and paste it in (the code module behind the form) regards Paul |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the Close button on a Userform
What exactly do you mean by "it doesn't work"?
Maybe you need to add a Command Button with the following code: Private Sub CommandButton1_Click() Sheet1.Activate Unload Me End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable close button on all froms & MsgBoxes | Excel Programming | |||
Disable Close Button | Excel Discussion (Misc queries) | |||
Disable the Close Window button of the worksheet | Excel Programming | |||
How to disable a sheet's x(close) button? | Excel Programming | |||
Disable close button of Modeless Userform | Excel Programming |