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

  • Thread starter Raphaël ZHOU \(Jadiam\)
  • 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!
 
S

Sachin Sancheti

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.
 

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