'/** ' * Copyright mpl by ERB software ' * http://wiki.yaslaw.info/dokuwiki/doku.php/vba/functions/index#isinteger ' * ' * Prüft on ein Value ein Integer-Wert ist ' * @param Variant Zu prüfender Wert ' * @param Boolean Angabe, ob Byte auch als Integer gelten (Byte: 0 bis 255) ' * @return Boolean ' */ Public Function isInteger(ByVal iExpression As Variant, Optional ByVal iWithByte As Boolean = False) As Boolean If Not IsNumeric(iExpression) Then Exit Function If iExpression < -32768 Or 32767 < iExpression Then Exit Function isInteger = (CInt(iExpression) = iExpression) If Not iWithByte And isInteger Then isInteger = Not isByte(iExpression) End Function