R rick Sep 8, 2009 #1 Is it possible to get an error code or an event when the user clicks on the form close button? Thanks. ... rick
Is it possible to get an error code or an event when the user clicks on the form close button? Thanks. ... rick
D Dave Peterson Sep 9, 2009 #2 Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then msgbox "You clicked the X" End If End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then msgbox "You clicked the X" End If End Sub