(Temporary)Disable event handlers

  • Thread starter Thread starter Markus Kinzler
  • Start date Start date
M

Markus Kinzler

I created a custom form including an ActiveX-Control.
This form includes a Item_write handler in vbscript.

When I try to modify the item externally ( a COM-AddIn) the event
handler is called and tries to get access to the ActiveX-Control.

Is it possible to disable the event handler during update of the
record through the AddIn.

Tnanks in advance.

Markus Kinzler.
 
Hello Markus,

Markus Kinzler said:
I created a custom form including an ActiveX-Control.
This form includes a Item_write handler in vbscript.

When I try to modify the item externally ( a COM-AddIn) the event
handler is called and tries to get access to the ActiveX-Control.

Is it possible to disable the event handler during update of the
record through the AddIn.

Tnanks in advance.

Markus Kinzler.

You can set a global Boolean Variable in Item_Open. If your Item is Modified
by your AddIn Item_Open
is not called.

e.g.

Dim bOpenedAsForm

Sub Item_Open
bOpendAsForm = true
End Sub

Sub Item_Write
if not bOpendAsForm then exit sub

' Your Code here

End Sub
 
Hello Rainer,

Thank you for your answer.

I already tried this, but I still can't write back my modifications to
an (appointment)item. I got an EOleSysError ( "Vorgang kann nicht
beendet werden!") when calling Item.Save within the AddIn (if parts of
the appointmentitem has been changed; no difference of standard as
Subject or userdefined properties are changed.)

Markus Kinzler.
 
Back
Top