28 th Jun 2022 21:47:15
Hai Friend , Sign In
Chennai City
G. K.
Tamil Nadu Government Holiday List 2018 in English and Tamil   *   Trichy: Wanted - PHP, MySql Programmers. Contact trichy people only 84894 28 444.   *   Indian Railways New Train Number List [Search / Enquiry / Locator / Finder]   *   பன்றிக் காய்ச்சல் பற்றி அறிந்து கொள்ளுங்கள் (Swine Flu H1N1)
See Also
TypeName Function TypeName Function
Miscellaneous Functions Misc. Functions
VB Datatype Visual Basic Datatype
Visual Basic Functions Visual Basic Functions
Visual Basic Home Visual Basic Home
Description  Syntax  Return Datatype  Example  Migration

VarType Function - Visual Basic 6.0 (VB 6.0)

Returns an Integer indicating the subtype of a variable.
Parameter Description
varname Required. Any variable name except user-defined type.

VarType Function's return value:
Constants Value Description
vbEmpty 0 Empty (uninitialized)
vbNull 1 Null (no valid data)
vbInteger 2 Integer
vbLong 3 Long Integer
vbSingle 4 Single
vbDouble 5 Double
vbCurrency 6 Currency value
vbDate 7 Date value
vbString 8 String
vbObject 9 Object
vbError 10 Error value
vbBoolean 11 Boolean value (Zero and Non-zero)
vbVariant 12 Variant. (Array Only)
vbDataObject 13 A data access object.
vbByte 17 Byte
vbUserDefinedType 36 Variants that contain user-defined types
vbArray 8192 Array

Return Data type:

Dim vVar, vStr as String, vInt as Integer, vLng as Long, vSng as Single, vTxt as TextBox
Dim vArray(), vStrArray as String

Statement Result Remark
VarType(vVar) 0 Empty
VarType(abcd) 0 uninitialized
VarType(vStr) 8 String
VarType(vInt) 2 Integer
VarType(vLng) 3 Long Integer
VarType(vSng) 4 Single
VarType(vTxt) 9 Object
VarType(Text1) 8 String (Text1 returns Text property value)
VarType(Text1.Text) 8 String
VarType(vArray) 8204 Array + Variant (8192 + 12)
VarType(vStrArray) 8200 Array + String (8192 + 8)
VarType("abcd") 8 String
VarType(1) 2 Integer
VarType(1.5) 5 Double
VarType(5 > 10) 11 Boolean (False)
VarType(-1) 2 Integer
VarType(null) 1 Null
Go to top

Migration from Visual Basic 6.0 (VB 6.0) to
  VarType Function in VB Script (VBS)
  VarType Function in JScript (JS)
  VarType Function in ASP (Active Server Page)
  VarType Function in PHP Script
  VarType Function in MS-Access
  VarType Function in MS SQL Server
  VarType Function in Oracle
  VarType Function in C Language
  VarType Function in C++ Language
  VarType Function in Foxpro
  VarType Function in Fortran
  VarType Function in MS Excel Sheet
Go to top

© 2021 Chennaiiq.com. All Rights Reserved.