MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

multiply row sources in single list box? is this possible?

  Asked By: Ira    Date: Mar 24    Category: MS Office    Views: 950

Im new to the world and headaches of excel VBA, just wondering what
the syntax is for multiple row selection in the row source property of a
list box (for a form) ? any help would be greatly appreciated...

Even better, what I'm trying to acheive is effectivly text box filter that will
reduce the content (from everything) of a list box. The fields I want are
client number (xxx), client name (first) and client name (second). As the
user types in the first letters of these three fields the contents of the list
box reduce to the point where only one selection remains. The data
source for these fields are three rows in a sheet.



1 Answer Found

Answer #1    Answered By: Ty Thompson     Answered On: Mar 24

The following code was pasted from the help.
Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 5
ListBox1.RowSource = "a1:e4"
ListBox1.ControlSource = "a6"
'Place the ListIndex into cell a6
ListBox1.BoundColumn = 0
End Sub

you may change the multiSelect property  of your listbox  at design time or at
run time with the following

ListBox1.MultiSelect = fmMultiSelectExtended

Didn't find what you were looking for? Find more on multiply row sources in single list box? is this possible? Or get search suggestion and latest updates.