Module
Contents
Index 🔎︎

# TypeName Function; VarType Function

Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.

## Syntax:

    TypeName (Variable) / VarType (Variable)

## वापसी मूल्य:

String; Integer

## पैरामीटर

Variable: The variable that you want to determine the type of. You can use the following values:

key word | Named constant | VarType | चर का प्रकार
Boolean |  | 11 | Boolean variable
Date | V_DATE | 7 | Date variable
Currency | V_CURRENCY | 6 | Currency variable
Double | V_DOUBLE | 5 | Double floating point variable
Integer | V_INTEGER | 2 | Integer variable
Long | V_LONG | 3 | Long integer variable
Object |  | 9 | Object variable
Single | V_SINGLE | 4 | Single floating-point variable
String | V_STRING | 8 | String variable
Variant |  | 12 | वेरिएण्ट वेरिएबल (परिभाषा द्वारा निर्धारित सभी क़िस्में हो सकती हैं)
Empty | V_EMPTY | 0 | वेरिएबल इनिशियलाइज्ड नहीं है
Null | V_NULL | 1 | कोई वैध डाटा नहीं

## Error codes:

5 Invalid procedure call

## उदाहरण:

    Sub ExampleType
    Dim iVar As Integer
    Dim sVar As String
    Dim siVar As Single
    Dim dVar As Double
    Dim bVar As Boolean
    Dim lVar As Long
    Dim cVar as Currency
    Dim tVar as Date
     MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_
     TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_
     TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_
     TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_
     TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_
     TypeName(cVar) & " " & VarType(cVar) & Chr(13) &_
     TypeName(tVar) & " " & VarType(tVar) & Chr(13) &_
     TypeName(lVar) & " " & VarType(lVar),0,"Some types in $[officename] Basic"
    End Sub