PDA

View Full Version : Solved: ListBox for the rows



white_flag
03-26-2010, 03:18 PM
Hello

I wound like to know if this is possible:


Private Sub UserForm_Initialize()
With Sheets("Sheet1")
ListBox1.RowSource = .Range("A1:F1").Address(external:=True)
End With
End Sub

I mean if it is possible to populate an list box based on the row not on the column
to take the date like this: A1..............F1
not like
A1
.
.
.
A5

if not, how can I solve this?

thank you

white_flag
03-26-2010, 04:14 PM
Private Sub UserForm_Initialize()
With Sheets("Sheet1")
ListBox1.List = Application.Transpose(.Range("A1:F1"))
End With
End Sub

lucas
03-26-2010, 04:24 PM
Thanks for posting your solution white flag