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
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