Re: Halt QueryUnload Event
Try this:
Dim strReply As String
strReply = MsgBox("End?", vbYesNo)
If strReply = vbNo Then 'User clicks no
Cancel = True 'Dont end program
Else
Cancel = False 'End Program
End If
Cheers
Rob
Re: Halt QueryUnload Event
Rob,
Beautiful! Thanks so much. I've been coding for years and figured I could nail this one so I was getting frustrated.
In fact I was using Cancel = True elsewhere in the QueryUnload event but I was turning it False based on other conditions but I didn't realize that would affect the Event stopping or not.
Anyhow. I *really* appreciate your tips. Worked perfectly, as you expected.
--Lyle E. Dodge
[email protected]