Every time I try to pass a UDT around to other functions I get this compile error: "Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions."
The only internal function that I've tested that works with UDTs as arguments is VarPtr. I can't even use TypeName or VarType.
Is there a way to pass UDTs as arguments that are not explicitly expecting the specific type? Kind of like Variant but for UDTs.
I would also like to store UDTs in arrays/dictionaries/collections, but that also seems to be problematic. UDTs sound perfect for my needs (not having to have a separate class module), but it seems like they are very strictly-typed (if that's the correct term for it).
EDIT: It looks like VarPtr expects the argument as the "Any" type, so maybe that's the type that accepts Variants and UDTs. Problem is, the VBA IDE built into Excel doesn't allow me to use that type.