this may be a good time to learn about COLLECTIONS and classes.
A collection is an advanced array because you can index it. Instead of searching thru every item to find yours,
just ask for it directly. colZoo("DOG").NAME
Shown is a class cANIMAL, that has a NAME, and QTY.
the code picks up an animal, its species name and counts it
it adds the Class to the collection. If already there, ignore the error, then update the Qty of the count.
paste the following code into Notepad and save the file....say: clsAnimal.txt
then in VBE where your modules are,
menu: FILE, IMPORT FILE, clsAnimal.txt
this new class will show in the Project thats used above.
Bookmarks