ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ListBox (https://www.excelbanter.com/excel-programming/299260-listbox.html)

TOM

ListBox
 
Hello,

I want set RowSource for ListBox in another worksheet then is my Forms. How
can I do it?
For same worksheet is like this: Sheet1!A2:C12

Thanks Tom



Tom Ogilvy

ListBox
 
Private Sub Userform_Initialize()
Listbox1.RowSource = Worksheets("Book2.xls"). _
Worksheets("Sheet1").Range("A1:A100").Address(exte rnal:=True)
End sub

Assuming the other workbook is open.

--
Regards,
Tom Ogilvy


"TOM" wrote in message
...
Hello,

I want set RowSource for ListBox in another worksheet then is my Forms.

How
can I do it?
For same worksheet is like this: Sheet1!A2:C12

Thanks Tom






All times are GMT +1. The time now is 04:54 PM.

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