View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Problems returning Collection object

M,

You may want to review:
Don't Use The New Keyword In A Dim Statement
http://www.cpearson.com/excel/variables.htm

The following doesn't throw an error,
but how you would use it is a puzzle to me.
'-------------------
Dim x As New Collection
Dim y As New Collection
Set x = y

'Do stuff

Set x = Nothing
Set y = Nothing
'------------------
Jim Cone
San Francisco, USA


"McManCSU"

wrote in message
...

Ok, i narrowed it down:

Dim x As New Collection
Dim y As New Collection
x = y
it errors with that same error on 'x=y'
why and how can i fix it?
--
McManCSU