Userform-List box help

K

KimberlyC

Hi
I have a row of data ( row 9 --- column c through m) on a worksheet that I
would like to display in a listbox (in a userform). I know how to display a
column of data in a listbox...but not a row.
Is it possible to display a row of data in a listbox?

Thanks in advance for your help!
Kimberly
 
S

steve

Kimberly,

You can use the initialize event of the form

Private Sub UserForm_Initialize()
Dim x As Long

For x = 3 To 13
ListBox1.AddItem (Cells(9, x))
Next

End Sub

You can use a specific sheet with Sheets("Sheet1").Cells(9,x)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top