If you double click on the combobox, you will be taken to the combobox's
change event code. In that procedure, you can then do something like:
Private Sub ComboBox1_Change()
Dim I As Integer
Dim J As Integer
Me.ListBox1.Clear
I = Me.ComboBox1.ListIndex
If I -1 Then
'code that populates based on entry
'for example if the data is stored on a sheet
'named mydata
For J = 1 To 10
Me.ListBox1.AddItem Sheets("mydata").Cells(J, I + 1).Value
Next
End If
End Sub
Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on
VB macros for Excel
"unplugs " wrote in message
...
It seems quite difficult to get an answer here... Anyway, another
question from me.. :P
My userform has a combobox and listbox. So, can I do such that, when
the user choose their username in the combobox, the listbox will
display onli the entries that the user made? and not display other
users' entries?
Is it possible to do so?
Any help would be appreciated.
;)
---
Message posted from http://www.ExcelForum.com/