Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource as a row
Hi;
what is the proper syntax for RowSource: ListBox1.RowSource=Range("A1:L1") gives me just A1 cell as the only element in the ListBox.List. Thanks. Boba |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource as a row
you can try this
Private Sub UserForm_Activate() Dim ws As Worksheet Dim i As Long Set ws = Worksheets("Sheet1") For i = 1 To 12 Me.ListBox1.AddItem ws.Cells(1, i) Next End Sub -- Gary "Boba" wrote in message ... Hi; what is the proper syntax for RowSource: ListBox1.RowSource=Range("A1:L1") gives me just A1 cell as the only element in the ListBox.List. Thanks. Boba |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource as a row
You only have one row in A1:L1.
If you want each of the values in A1:L1 as your list: listbox1.list = application.transpose(range("a1:L1").value) Boba wrote: Hi; what is the proper syntax for RowSource: ListBox1.RowSource=Range("A1:L1") gives me just A1 cell as the only element in the ListBox.List. Thanks. Boba -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource as a row
Try something more like this...
ListBox1.RowSource=Sheets("Sheet1").Range("A1:L1") .Address -- HTH... Jim Thomlinson "Boba" wrote: Hi; what is the proper syntax for RowSource: ListBox1.RowSource=Range("A1:L1") gives me just A1 cell as the only element in the ListBox.List. Thanks. Boba |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource as a row
My code does not work (in retrospect). Use Dave's
-- HTH... Jim Thomlinson "Jim Thomlinson" wrote: Try something more like this... ListBox1.RowSource=Sheets("Sheet1").Range("A1:L1") .Address -- HTH... Jim Thomlinson "Boba" wrote: Hi; what is the proper syntax for RowSource: ListBox1.RowSource=Range("A1:L1") gives me just A1 cell as the only element in the ListBox.List. Thanks. Boba |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refreshing ROWSOURCE | Excel Programming | |||
RowSource | Excel Programming | |||
RowSource in ListBox | Excel Programming | |||
help with rowsource | Excel Programming | |||
Using IF, Then with rowsource? | Excel Programming |