Hi, I'd like to have a msgbox that pops up when the user clicks the 'X' button on the top right corner of a form.
So the Msgbox would say "are you sure you want to close, changes will not be saved", if they answer vbNo then I want to cancel the Close event and keep the form active.
Does anyone know how to do this? I suspect, we would want to put some code in this Sub, but I'm not sure what to do.
thanks,
Taylour
So the Msgbox would say "are you sure you want to close, changes will not be saved", if they answer vbNo then I want to cancel the Close event and keep the form active.
Does anyone know how to do this? I suspect, we would want to put some code in this Sub, but I'm not sure what to do.
Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
End Sub
thanks,
Taylour