Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > VBScript Manual > VarType Function





Bookmark.
Microsoft® Visual Basic® Scripting Edition
VarType Function
 Language Reference 
Version 1 

See Also


Description
Returns a value indicating the subtype of a variable.
Syntax
VarType(varname)

The varname argument can be any variable.

Return Values
The VarType function returns the following values:

Constant Value Description
vbEmpty    0 Empty (uninitialized)
vbNull    1 Null (no valid data)
vbInteger    2 Integer
vbLong    3 Long integer
vbSingle    4 Single-precision floating-point number
vbDouble    5 Double-precision floating-point number
vbCurrency    6 Currency
vbDate    7 Date
vbString    8 String
vbObject    9 Automation object
vbError   10 Error
vbBoolean   11 Boolean
vbVariant   12 Variant (used only with arrays of Variants)
vbDataObject   13 A data-access object
vbByte   17 Byte
vbArray 8192 Array


Note  These constants are specified by VBScript. As a result, the names can be used anywhere in your code in place of the actual values.

Remarks
The VarType function never returns the value for Array by itself. It is always added to some other value to indicate an array of a particular type. The value for Variant is only returned when it has been added to the value for Array to indicate that the argument to the VarType function is an array. For example, the value returned for an array of integers is calculated as 2 + 8192, or 8194. If an object has a default property, VarType (object) returns the type of its default property.

The following example uses the VarType function to determine the subtype of a variable.

Dim MyCheck
MyCheck = VarType(300)           ' Returns 2.
MyCheck = VarType(#10/19/62#)    ' Returns 7.
MyCheck = VarType("VBScript")    ' Returns 8.

ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่