Hello again.
I'm playing with custom classes, and I've created a method in one that looks like this:
I have a different class, where the Populate method does NOT have the optional argument, that works just fine. (as does this one, if I remove the optional argument)![]()
Please Login or Register to view this content.
When I try to use it as such:
I get a a compile error, Expected: =![]()
Please Login or Register to view this content.
I'm not setting or assigning anything, and the sub doesn't return a value, so where (more importantly, why) does the VBE want an =?
Edit: Because I have another class with a Public Sub Populate, I changed the one in question to PopulateIP, in case the duplicate name would be an issue. It did not fix the problem. (Bonus question: Since these are public subs in class modules, DO they need to be different names? Or can I have multiple classes with custom methods of the same name?)
Edit: When trying to call the method without the optional argument, VBE does not complain.
Bookmarks