Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Classes, and the For Each construct in Excel?

Andy

VBA doesn't support directly. However, you can modify the class module in a
text editor and import it back into VBA. See this post by Chip Pearson.

http://www.google.com/groups?threadm...%40tkmsftngp02

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Andy" wrote in message
...
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!



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
Excel Classes alish Excel Discussion (Misc queries) 3 October 30th 07 01:03 PM
how do i construct a correlogram in excel? Alice Charts and Charting in Excel 3 March 16th 06 10:44 PM
Anyone know good excel classes? ph8 Excel Discussion (Misc queries) 2 December 16th 05 03:16 PM
How can I construct a broken Y axis in Excel? Fisherwy Excel Discussion (Misc queries) 1 November 6th 05 04:53 PM
How can I use Excel to schedule students for classes? Mort 62 Excel Discussion (Misc queries) 1 September 8th 05 03:45 PM


All times are GMT +1. The time now is 12:16 AM.

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"