LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems returning Collection object


I get this error:
Compile error

Argument not optional

when i try to return a collection like this:

For i = 1 To assyNums.count
For j = 1 To assyNums.Item(i).getBOM.count
partnum = assyNums.Item(i).getBOM.Item(j)
occur = numOccurances(partnum)
numOccur.Add (occur)
Next j
.......

(BOMParts is an obj variable and is already initialized)
Public Function getBOM() As Collection
getBOM = BOMparts
End Function


I have tried the simple way where I make a temporary collection an
assign it to what ".getBOM()" returns but same error. Any help

--
McManCS
-----------------------------------------------------------------------
McManCSU's Profile: http://www.excelforum.com/member.php...fo&userid=2437
View this thread: http://www.excelforum.com/showthread.php?threadid=39422

 
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
Collection Object Keys Todd Huttenstine Excel Programming 10 October 29th 04 01:14 PM
returning pivottable object from a range object Grant Excel Programming 2 September 27th 04 02:22 AM
Function unable to return Collection object Adrian[_7_] Excel Programming 1 July 12th 04 06:22 PM
Collection Class problems Flemming Dahl Excel Programming 4 February 11th 04 04:41 PM
CombBox - Object of What Collection? George Excel Programming 7 February 10th 04 12:01 AM


All times are GMT +1. The time now is 05:52 PM.

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

About Us

"It's about Microsoft Excel"