![]() |
Rowsource referenced to a hidden workbook
Hi,
I would like a rowsource of a textbox in a userform to be reference to an open but hidden workbook. I've tried this but it doesn't work: sub test with userform1 .listbox1.rowsource=workbooks("book2.xls").workshe ets(1).range("A1:A100") .show end with end sub Thanks a lot! |
Rowsource referenced to a hidden workbook
Update your rowsource to the below. ..listbox1.rowsource = "Sheet2!A1:A100" You need to tell it the sheet name in the book. If this is a different workbook that you are referencing then the one your form is in, then you have to word it a little differently. borg Wrote: Hi, I would like a rowsource of a textbox in a userform to be reference to an open but hidden workbook. I've tried this but it doesn't work: sub test with userform1 .listbox1.rowsource=workbooks("book2.xls").workshe ets(1).range("A1:A100") .show end with end sub Thanks a lot! -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532480 |
All times are GMT +1. The time now is 12:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com