I want to write a generic function to convert between arbitrary types, for example:
The parameters of the function are as follows:Code:TheValue = CType(obj, MyClass) TheValue2 = CType(obj, MyClass2)
I'd like to hear everyone's advice. Thanks.Code:Public Function CType(ByVal Value As Variant, DestType As TypeOrClassName) As Variant End Function




Reply With Quote