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: 21
Default Multiciplicity

Hi,

I've got two user-defined classes, Country and Product. Every product is
sold in every country, therefore the countries should contain a collection of
products (reference) and vice versa.

So I wrote:

*** class product

Public Countries As Collection

Private Sub Class_Initialize()
Set Countries = New Collection
End Sub

Public AddCountry(ByRef c As Country)
Me.Countries.Add c
c.Products.Add Me
End Property

*** class country

Public Products As Collection

Private Sub Class_Initialize()
Set Products= New Collection
End Sub

But that doesn't seem to work at all. What am I doing wrong?

Regards, Fabian


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...el.programming
 
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



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

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"