A
amakeler
Subject: Newbie - Trapping _QueryClose and/or _Terminate
IN VBA (for Word)
Hi all,
Can somebody help with the following.
I have a form (dialog box) and I want to prevent the user fro
terminating
the form (eg by clicking the close X at the top-right corner) excep
when I
allow it.
I have written the following handlers, but they don't do the job:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode A
Integer)
If ProcessExitReq = 0 Then
Exit Sub
End If
End Sub
Private Sub UserForm_Terminate()
If ProcessExitReq = 0 Then
Exit Sub
End If
End Sub
What can I do to trap all the exit messages and prevent them (or th
exit
events) from running to completion and terminating the form?
Please reply to this forum and my home address:
(e-mail address removed)
tia
Avraha
IN VBA (for Word)
Hi all,
Can somebody help with the following.
I have a form (dialog box) and I want to prevent the user fro
terminating
the form (eg by clicking the close X at the top-right corner) excep
when I
allow it.
I have written the following handlers, but they don't do the job:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode A
Integer)
If ProcessExitReq = 0 Then
Exit Sub
End If
End Sub
Private Sub UserForm_Terminate()
If ProcessExitReq = 0 Then
Exit Sub
End If
End Sub
What can I do to trap all the exit messages and prevent them (or th
exit
events) from running to completion and terminating the form?
Please reply to this forum and my home address:
(e-mail address removed)
tia
Avraha