I am writing a macro which requires the placement of "Units" into "Cartons".
I have a Carton class and a Unit class. The Carton class has a property Contents which is an array of Unit objects. The Unit class has a property MyCarton which is a Carton.
The Unit class also has a method "placeIntoCarton" which takes a Carton object as an input and sets that to its MyCarton property.
The Carton class has a method "Add" which takes a Unit object as an input and adds it as an element in the Contents array. I would like to call the "placeIntoCarton" method from within the "Add" method, so I can associated a Carton instance and an Object instance with eachother by calling just one method. In other words, if I look at the "Add" method inside the Carton class, I want to say
As of right now, this doesn't work, though I haven't tried everything yet.
Is this appropriate usage of the "Me" keyword? What is the proper way of doing this?
Thanks for all help. Really appreciated.
Bookmarks