If you simply declare a variable with a Dim statement and leave off the type-declaration keyword or character, the variable is a variant : Variant « Data Type « VBA / Excel / Access / Word

Home
VBA / Excel / Access / Word
1.Access
2.Application
3.Data Type
4.Data Type Functions
5.Date Functions
6.Excel
7.File Path
8.Forms
9.Language Basics
10.Math Functions
11.Outlook
12.PowerPoint
13.String Functions
14.Windows API
15.Word
16.XML
VBA / Excel / Access / Word » Data Type » Variant 
If you simply declare a variable with a Dim statement and leave off the type-declaration keyword or character, the variable is a variant
 
Sub var()
    Dim myVar
End Sub

 
Related examples in the same category
1.Variant string
2.A Variant allows VBA to make its own decision as to what type of data it is holding
3.Get the variable type for Variant
4.One of the few instances in which you have no choice for using a Variant:
5.A Variant allows VBA to make its own decision as to what type of data it is holding: string and integer
6.Assign difference type variable to Variant variable
7.Add Variant integer to Variant string
8.Add Variant string to Variant integer
9.Add Variant integer in string to another Variant integer in string
10.Determining the Type of a Variant
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.