Article ID: 166853
Article Last Modified on 2/12/2007
171246 OL97: Supported Outlook Forms Control Events
Sub CommandButton1_Click()
' Sets ctl to the P.2 page of the form
Set ctl = Item.GetInspector.ModifiedFormPages("P.2")
' Sets ListBox1 equal to the ListBox on the control
Set ListBox1 = ctl.controls("ListBox1")
' Loop to populate Listbox with values
For i = 0 To 3
ListBox1.AddItem cstr(i)
Next
End Sub
Sub ListBox1_click()
MsgBox "ListBox1 Click event fired."
End Sub
Sub ListBox2_click()
MsgBox "ListBox2 Click event fired."
End Sub
Sub Item_CustomPropertyChange(ByVal myPropName)
MsgBox "CustomPropertyChange event fired."
Select Case myPropName
Case "IsBound"
MsgBox "Code related to field changing goes here."
Case Else
MsgBox "<<Select Case Else>>"
End Select
End Sub
166368 OL97: How to Get Help Programming with Outlook
170783 OL97: Q&A: Questions about Customizing or Programming Outlook
Additional query words: OutSol OutSol97
Keywords: kbcode kbinfo kbprogramming KB166853