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: 66
Default Avoiding duplication in objects with large commonality

I am implementing an object structure which consists of a number of
objects and each of those objects should be accessed via a collection
class. For example:

Joints.Item("JointName").JointProperties
Pipes.Item("PipeName").PipeProperties
etc.

The properties in each of the collection classes are always very
similar - consisting of .Count and .Item (which returns a pointer to
the child object).
At the moment I have created a new class for each of the collections
and duplicated the collection code in each. This seems quite
inefficient and prone to mistakes if I ever decide to make a change to
the way I deal with collection objects.

Is there any neater way of doing this? I'm not sure whether I can do
anything with the "Implements" keyword but it looks like this is more
for creating a common interface rather than common base code.

Thanks a lot for your time,
Andrew
 
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
Avoiding #N/A Heather Excel Discussion (Misc queries) 4 August 25th 09 08:41 PM
Avoiding #value MicroMain Excel Worksheet Functions 2 January 25th 06 05:11 AM
Avoiding #NUM! Bruno Campanini Excel Worksheet Functions 9 September 14th 05 02:34 PM
return most frequent objects/numbers in large worksheet? trav Excel Worksheet Functions 3 August 12th 05 11:02 AM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian[_7_] Excel Programming 1 August 26th 04 10:49 PM


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