View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 414
Default Classes, and the For Each construct in Excel?

Hi,
As a VB6 programmer doing a bit of VBA work, I want to use classes, and have a global collection for some specific data, so that I can do a 'For Each' construct to loop through the collection object
All I seem to get is Error 438 - Object doesn't support this property or method

Is there a better way of doing this in Excel?

The basic code I have is..

A class cProject
A collection class cProjects

dim oProj as cProject
set Projects = new cProjects
Projects.add .... 'add an instrance - this is successful

for each oProj in Projects
...
next

Any help would be appreciated
Many thanks!