Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I am using the following code to populate a listbox with multiple-column entries. My problem is I can't find a way to populate the columns' headers too. Any ideas muchly appreciated. KL -------------Code Start-------------- Dim MyArray() Private Sub UserForm_Initialize() Dim r As Single cCounter = Sheets("DBASE").UsedRange.Columns.Count - 1 rCounter = Sheets("DBASE").UsedRange.Rows.Count - 1 ReDim MyArray(rCounter, cCounter) lb1.ColumnCount = cCounter + 1 'Load values MyArray For r = 0 To rCounter For c = 0 To cCounter MyArray(r, c) = Sheets ("DATABASE").UsedRange.Cells(r + 2, c + 1) Next c Next r 'Load ListBox1 lb1.List() = MyArray End Sub -------------Code Start-------------- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populating listbox | Excel Discussion (Misc queries) | |||
Populating listbox | Excel Programming | |||
Populating a ListBox | Excel Programming | |||
populating a multi-column Listbox | Excel Programming | |||
populating a multi-column Listbox | Excel Programming |