Hi all,
I have a class (a collection) called files, each member is an object named file.
In another class, in class_initialize, i have:
Set mvarfiles = New files
In a method of that same class, I have:
mvarfiles.Add fileTag, FileName
mvarfiles(fileTag).someOtherFunction
When this method is called, I get an error: Invalid procedure call or argument. The error occurs on the someOtherFunction call.
someOtherFunction is a public function in the file class. If I replace
mvarfiles(fileTag).someOtherFunction
with
mvarfiles(1).someOtherFunction
someOtherFunction runs and there is no error. However, I would like to be able to acces the member of the collection by its fileTag, not its index. FileTag is a String.
I'm afraid the description of the problem is unclear. Should I be able to access a function within a collection member in this manner?
Thanks,
Steve Gibson