CISA FotoGallery

Statistiche

Tot. visite contenuti : 928187
Home Articoli tecnici Moduli IsNothing(function)

IsNothing(function)

CODICE

Public Function IsNothing(varToTest As Variant) As Boolean
'******************************************************
'Name : IsNothing (Function)
'Purpose : Verifie if the Test Variable is Empty
'Author : Alessandro Baraldi
'E.Mail : Questo indirizzo e-mail è protetto dallo spam bot. Abilita Javascript per vederlo.
'Date : 23 gennaio 2002
'Called by :
'Calls :
'Inputs : Variant
'Output : Boolean
'******************************************************
    
IsNothing = True
    Select Case VarType(varToTest)
        Case vbEmpty
                Exit Function
        Case
vbNull
                Exit Function
        Case
vbBoolean
                If varToTest Then IsNothing = False
        Case vbByte, vbInteger, vbLong, vbSingle, vbDouble, vbCurrency
                If varToTest <> 0 Then IsNothing = False
        Case vbDate
                IsNothing = False
        Case vbString
                If (Len(varToTest) <> 0 And varToTest <> " ") Then _
                                IsNothing = False
        Case vbVariant
                If IsArray(varToTest) And _
                    UBound(varToTest) + 1 > 0 Then _
                                IsNothing = False
    End Select
End Function