Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indexing Sheets in Referenced Workbook within formula tiazmos Excel Worksheet Functions 1 January 14th 10 07:13 PM
Closing a referenced workbook Frederick Chow Excel Programming 0 January 3rd 06 04:26 PM
listbox rowsource from wrong workbook David Sisson[_2_] Excel Programming 2 October 28th 05 02:13 PM
Workbooks referenced by a deleted workbook Triggerfish[_2_] Excel Programming 1 February 13th 04 09:44 PM
Workbook referenced by a deleted workbook Triggerfish Excel Programming 0 February 13th 04 06:09 PM


All times are GMT +1. The time now is 06:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"