View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arjan Arjan is offline
external usenet poster
 
Posts: 29
Default fill a listbox with data

Hi All,

I would like to fill a list box with a click on a commandbutton.
The code I use is printed below.

----------------------------
Private Sub CommandButton3_Click()
' De listboxen vullen met de juiste data

ListBox1.RowSource = "A2:D8"
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "360;25;50;50"

ListBox2.RowSource = "A2:D10"
ListBox2.ColumnCount = 4
ListBox2.ColumnWidths = "360;25;50;50"

ListBox3.RowSource = "A2:D14"
ListBox3.ColumnCount = 4
ListBox3.ColumnWidths = "360;25;50;50"

ListBox4.RowSource = "A2:D18"
ListBox4.ColumnCount = 4
ListBox4.ColumnWidths = "360;25;50;50"

End Sub
----------------------------

However, I would like to use more than one sheet..
and the data selected with this code is only the data from sheet1.

How can I specify the sheet where the data has to be collected from?
thank you all.. :)

Arjan Bregman


*****
the knowledge is always there, maybe hidden, but it is there..
*****