ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform-List box help (https://www.excelbanter.com/excel-programming/275080-userform-list-box-help.html)

KimberlyC

Userform-List box help
 
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



steve

Userform-List box help
 
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)
--
sb
"KimberlyC" wrote in message
...
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






All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com