Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.
When handling data in a Variant, I'm always interested in knowing the exact type of the data within the variant. In my own code I could add an attribute with the information, but when getting the value of a control that is not possible.
The problem is the automatic conversion done by the Variant To Data function. If the data is a double and the type parameter is set to an integer type, the double value is converted without any error.
My suggestion is to add a boolean parameter to the Variant To Data function to force it to return an error if the type parameter is not exactly the same as the data type.