Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

listbox and RowSource

94 views
Skip to first unread message

Jo

unread,
Dec 2, 2001, 6:28:50 AM12/2/01
to

hello
my problem

A listbox created on excel 97 (PC) does'nt works on Excel98 (MAC).
VBA on Mac does'nt recognise the property RowSource.
What can i do ?
thanks


George Clark

unread,
Dec 2, 2001, 9:05:11 AM12/2/01
to
You'll have to populate the list box the old-fashioned way, by looping
through the range where the data is, and using the .AddItem property of the
listbox control.

So, assuming a range named "datasource", and a listbox named "ListBox1", you
could do something like this:

Dim cell As Range
For Each cell in Range("datasource")
ListBox1.AddItem cell.Value
Next

I assume this is on a UserForm, so I'd suggest using the UserForm_Initialize
event for this.

George

0 new messages