Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am looking to run a macro whenever the userform is closed, whether by a cancel button created by me or by clicking the red 'x'. Thanks Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's what the UserForm_QueryClose and UserForm_Terminate event handlers
are for. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) ''Allows cancelling close by setting Cancel = True End Sub Private Sub UserForm_Terminate() ''Runs after userform is terminated End Sub -- Jim "Dave M" wrote in message ... | Hello, | | I am looking to run a macro whenever the userform is closed, whether by a | cancel button created by me or by clicking the red 'x'. | | Thanks | | Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing UserForm | Excel Programming | |||
closing userform automatically | Excel Programming | |||
closing a userform | Excel Programming | |||
Vba - automaticaly closing userform | Excel Programming | |||
Help with closing a UserForm | Excel Programming |