Outlook 2003 close-event-handling changed/buggy?

  • Thread starter Hans-Juergen Neschtschenko
  • Start date
H

Hans-Juergen Neschtschenko

Can somebody confirm the following behaviour?

This code (see below) prevents users e.g. from closing a form with
<ESC>, <ALT F4> and so on.
After cancelling the close-event once, the accepted closing via
commandbutton1 doesn't lead to the msgbox "I'm closing now". So any code
I want to be performed in an accepted close-event (deleting
locking-informations; releasing object variables and further) does not
run any more.

It did work correctly in Outlook2000.

VBScript-Code in published form in a public folder on Exchangeserver:


Option Explicit
Dim boolSomeThing
boolSomeThing = False
'-------------------------
Function Item_Close()
If Not boolSomeThing Then
MsgBox "No, no, I won't close"
Item_Close = False
Exit Function
End If
MsgBox "I'm closing now"
End Function
'-------------------------
Sub CommandButton1_click()
boolSomeThing = True
Item.Close 1
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top