How to handling Custom Form Control Event in VB Com Add-In?

  • Thread starter Thread starter Raphaël ZHOU \(Jadiam\)
  • Start date Start date
R

Raphaël ZHOU \(Jadiam\)

How to handling Custom Form Control Event in VB Com Add-In?

I have a ListBox in my custom Form for Outlook. I cannot use WithEvents with
ListBox object! : (

Private Sub objListBox1_Click()
MsgBox ("message")
End Sub


Please help me!
 
In the com addin you could declare the listbox withevents. Do that.
Then take the object reference of the listbox existing on the custom
form.
For eg: you have ListBox1 on custom form

In com Addin in General Section
dim withevents objMyListbox as ListBox

In Com addin in new inspector event or any other event where you have
access to the custom form:
Set objMyListbox =
Item.GetInspector.ModifiedFormPages("General").Controls("ListBox1")

Here, General is the page name and Item referes to the current item.
 
Back
Top