Public Function ReplaceValueOfType( _ ByVal vOriginal As Variant _ , ByVal vFind As Variant _ , ByVal vReplace As Variant _ ) As Variant
ReplaceValueOfType(2%, 0%, 1%) = 2% ReplaceValueOfType(0%, 0%, 1%) = 1% ReplaceValueOfType(0%, 0!, 1!) = 0% ReplaceValueOfType(0!, 0!, 1!) = 1! IsNull(ReplaceValueOfType(Null, Null, 1)) = True ' #5 IsNull(ReplaceValueOfType(Null, 0, 1)) = True IsNull(ReplaceValueOfType(0, 0, Null)) = TrueSee also:
ReplaceValue Function ReplaceVarTypeWithValue Function VarType Function (Visual Basic)vOriginal: The value whose value and data type are checked to see if they match vFind. Function returns vReplace if vOriginal equals vFind and VarType(vOriginal) equals VarType(vFind). Function returns vOriginal otherwise. vOriginal must be a numeric or string or Null value which is type-compatible with vFind.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.