So I’m doing some proof of concept here.
I want to use a starting syntax like the following in the Debug.Print line:
Now the trick here to get the testCT(ctl) syntax is to set a default member in the class.
This basically makes testCT.Controls(ctl) and testCT(ctl) mean the same thing to VBA.
This is not a feature available for manipulation within the VBE environment.
You either have to export your file to text, add a line and reimport the class, or if you are a RubberDuckVBA user you can use the code I have above using ‘@DefaultMember before the Function/Sub/Property that I want to be default and then that opens up the syntax I’m using.
In order to do this with RubberDuck see the comments at the end of this article: https://rubberduckvba.blog/2019/12/14/rubberduck-annotations/#comment-4376
In order to do this using the export / import method, check out this article: http://www.cpearson.com/Excel/DefaultMember.aspx
Now I’ll be able to use another class with another default member to fully implement this. I’m looking forward to a final quick implementation of the basic functionality on Monday.