The information in this article applies to:
SUMMARYIn Microsoft Visual Basic Programming System, Applications Edition, when you use the VarType function to return the value indicating the subtype of a variable, the function returns the value 8204 if your variable is defined as either of the following:
-or- MORE INFORMATION
When you use the VarType function to return the subtype of your variable,
the function returns the value 8204 for a variable that is an array of type
Variant (8192 for Array + 12 for Variant). If your variable is a Variant
that contains an array, the function also returns the value 8204. An array
of type Variant is exactly the same as a Variant that contains an array.
The following Visual Basic example demonstrates this:
Visual Basic ExampleThe following procedure shows that the variable q, defined as a variant containing an array of values, x, y, and z, is actually an array of variant data types.
Even though each element of the array q is dimensioned as an Integer data
type, you can assign the value of any of the elements to a String type
variable without receiving an error message. Additionally, when you use the
TypeName function to return the type of one of the elements of q, the value
String is returned, instead of Integer.
Therefore, when you dimension an array as Variant data type, each element of the array is Variant data type. That is, an array of variants is the same as an array dimensioned as Variant data type as in the following example:
REFERENCESFor more information about the VarType Function, choose the Search button in Visual Basic Reference Help, and type: VarType Additional query words:
Keywords : |
Last Reviewed: October 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |