jgoodman00
Programmer
- Jan 23, 2001
- 1,510
I am trying to use a MultiSelect Listbox, & capture the input by using the
AfterUpdate event. Trouble is, the AfterUpdate event does not occur if the
Listbox is set to allow multiple selection...
Steps to replicate behaviour:
Add a UserForm (UserForm1), & add a single Listbox to the form (Listbox1).
Add the following code to the form module:
Option Explicit
Private Sub ListBox1_AfterUpdate()
MsgBox "Event Fired!"
End Sub
Private Sub UserForm_Activate()
Dim i As Integer
For i = 0 To 9
Me.ListBox1.AddItem i
Next i
End Sub
If ListBox1.MultiSelect = fmMultiSelectSingle then the event fires. However, if it is set to fmMultiSelectExtended or fmMultiSelectMulti it does not...
Any comments?
Cheers,
James Goodman MCP
AfterUpdate event. Trouble is, the AfterUpdate event does not occur if the
Listbox is set to allow multiple selection...
Steps to replicate behaviour:
Add a UserForm (UserForm1), & add a single Listbox to the form (Listbox1).
Add the following code to the form module:
Option Explicit
Private Sub ListBox1_AfterUpdate()
MsgBox "Event Fired!"
End Sub
Private Sub UserForm_Activate()
Dim i As Integer
For i = 0 To 9
Me.ListBox1.AddItem i
Next i
End Sub
If ListBox1.MultiSelect = fmMultiSelectSingle then the event fires. However, if it is set to fmMultiSelectExtended or fmMultiSelectMulti it does not...
Any comments?
Cheers,
James Goodman MCP