Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default ListBox Error

I have a Workbook named Weekly Projections.xls the worksheet which is
viewed for data entry is named Projections, this is also the sheet where
the ListBox is called from. I want to use data on worksheet Work Shifts
Drivers (located in the same workbook).

Here is the code I was trying:

Private Sub Userform_Initialize()

ListBox1.RowSource = Worksheets("Weekly Projections.xls"). _
Worksheets("Work Shifts Drivers").Range("B5:B50").Address(external:=True)

End Sub

but when I run the code I get the following error:

run-time error '9'
Subscript out of range

Any ideas as to where I have gone wrong?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default ListBox Error


sheets/books typo :)

ListBox1.RowSource = WorkBOOKS("Weekly Projections.xls"). _
Worksheets("Work Shifts Drivers").Range("B5:B50")._
Address(external:=True)


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Patrick Simonds wrote :

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
error 13 when setting worksheet listbox Amedee Van Gasse Excel Discussion (Misc queries) 1 September 24th 08 02:06 PM
ListBox, error 424 coldmejl Excel Worksheet Functions 1 June 14th 05 10:15 AM
Multicolumn Listbox and ordinary listbox Ron_D Excel Programming 0 June 4th 04 08:56 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM


All times are GMT +1. The time now is 11:13 PM.

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"