Public Function PromoteToMostCapableDataType( _ ByRef rOne As Variant _ , ByRef rTwo As Variant _ ) As Boolean
Assuming Dim varOne As Variant Dim varTwo As Variant varOne = 1% varTwo = 3# for example PromoteToMostCapableDataType(varOne, varTwo) = True leaves VarType(varOne) = vbDoubleSee also:
MostCapableDataType Function FixUpToType FunctionThe data type of one or both arguments will be changed so that they are capable of storing the same type of values. Function returns True upon success, but may generate an error if passed arguments such as object pointers.
This function uses the MostCapableDataType function to determine the data type to which arguments will be promoted.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.