Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
USERFORM X BUTTON
Hi all,
I am wondering what code do I need to stop the userform closing when the X button is clicked? Thanks in advance Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
USERFORM X BUTTON
Something like this: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True End If End Sub -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "Greg B" wrote: Hi all, I am wondering what code do I need to stop the userform closing when the X button is clicked? Thanks in advance Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
USERFORM X BUTTON
Thank you for your answer
Greg "Tom Ogilvy" wrote in message ... Something like this: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True End If End Sub -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "Greg B" wrote: Hi all, I am wondering what code do I need to stop the userform closing when the X button is clicked? Thanks in advance Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OK Button in UserForm | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Userform button | Excel Programming | |||
The userform X button | Excel Programming | |||
UserForm Button Help | Excel Programming |