Public Sub SwapNonObjects( _
ByRef rOne As Variant _
, ByRef rTwo As Variant _
)
Swap two values that are not Objects or DataObjects.
Assumes that the arguments are of compatible types.
For example, the following types of arguments would be compatible: Integer and Variant with Integer value.
String and Variant with String value.
Double and Variant with Long value.
Variant with Integer value and Variant with String value.
Example: Assuming
Dim varOne As Variant
Dim varTwo As Variant
varOne = "1"
varTwo = "2"
for example
SwapNonObjects varOne, varTwo
leaves
varOne = "2"
varTwo = "1"
See also: SwapVariants Subroutine
SwapCharacters Function
rOne: Value which is to be swapped with that of rTwo.
rTwo: Value which is to be swapped with that of rOne.
Note: This function modifies both of its arguments (or it generates an error if it cannot do so, such as when one has a String value and the other is has an Integer value and the variables are not Variants).
v1.3 Addition: This Subroutine is similar in function to that of the SwapVariants function in previous versions of Entisoft Tools. In v1.3 if Entisoft Tools, SwapVariants has been modified to handle variables of any type, including specifically, Objects and Data Objects. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.