Hi,
Let's say I have user-defined type:
The type has three elements (Name, Age, Pets). Is there some way that I can return the number of elements of a UDT like above?![]()
Please Login or Register to view this content.
Thanks a lot for reading!
Hi,
Let's say I have user-defined type:
The type has three elements (Name, Age, Pets). Is there some way that I can return the number of elements of a UDT like above?![]()
Please Login or Register to view this content.
Thanks a lot for reading!
No, there isn't. This would require reflection, which VBA does not support.
Depending on what you are actually trying to do, there may be other solutions
Hi !
Maybe reading the code via the CodeModule object of a VBComponent object from the VBProject object …
Thanks a lot for that - "Reflection" is new concept for me, thanks for letting me know about it!
Thanks for info - I'll certainly look into that.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks