Below are two methods of deleting an object from a collection.
(1) uses a "for i = loop"
(2) the other uses a "for each loop"
I can remove the target object from the target collection using the for i = loop
I do not understand what value should go into the Remove method
for the "for each loop".
The workbook ("Junk Test objects within a collection.xlsm") for the code is attached
Below you will see both code approaches. They can be found in the module, Test_House_Class.
The Test_House_Class module is dependent upon custom classes:
aFloor is an instance of a Floor_Class
FloorCollection is an instance of a Floor_CollectionClass
![]()
Please Login or Register to view this content.
Bookmarks