Listbox_Change() sample code available?

Can anyone point me to sample code showing how lbXxxxxx_Change() is supposed to work?

I can't get code to jump to the sub when something in a listbox is changed.

Parents
No Data
Reply
  • Roy, 

    Here is a code example for you. Your form needs a single listbox named: ListBox1

    Private Sub UserForm_Initialize()
        ListBox1.AddItem "One"
        ListBox1.AddItem "Two"
        ListBox1.AddItem "Three"
    End Sub
    
    Private Sub ListBox1_Change()
        MsgBox ListBox1.value
    End Sub
    

    Happy Coding,

    -Shelby

Children
No Data