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: 29
Default Function unable to return Collection object

Hi,

Here is a small segment of my code :
"
Sub SeedOPErrs()

Dim a As Collection
a = rFunction() ' <----VBA editor returns an error "Argument not
optional"
' when I attempt to run SeedOPErrs

End Sub

Function rFunction() As Collection

Dim a As New Collection
a.Add "GT"

rFunction = a

End Function

"

What is wrong with the code above ? Why is there an error "Argument not
optional" ??!! I stared at my screen for hours ...and i still cannot figure
out !!
Thanks in advance !!!

Regards,
Adrian


 
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
Unable to cast com object (interop) yh Excel Discussion (Misc queries) 0 April 26th 10 09:16 AM
Unable to access GridLines in Microsoft Graph Object [URGENT] usamaalam Charts and Charting in Excel 0 March 7th 05 05:29 AM
Unable to add references to Calendar control and outlook object utham raj via OfficeKB.com Setting up and Configuration of Excel 0 February 3rd 05 09:48 AM
CombBox - Object of What Collection? George Excel Programming 7 February 10th 04 12:01 AM
unable to create embedded object on a userform Robert Nobles Excel Programming 0 September 9th 03 08:49 PM


All times are GMT +1. The time now is 01:48 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"