VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This checks weather a variable is a number.

by Cinetics (1 Submission)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 27th December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This checks weather a variable is a number.

Rate This checks weather a variable is a number.



' Syntax for use :  isInteger(variable)
' Example If isInteger("342626")=True Then..

' My E-Mail [email protected]
' Add me to your msn if you program!

Function isInteger(Text) As Boolean
For i = 1 To Len(Text)
For x = 0 To 9
If Trim(Mid(Text, i, 1)) = Trim(x) Then
p = p & Mid(Text, i, 1)
End If
Next x
Next i
If Trim(p) = Trim(Text) Then isInteger = True
End Function

Download this snippet    Add to My Saved Code

This checks weather a variable is a number. Comments

No comments have been posted about This checks weather a variable is a number.. Why not be the first to post a comment about This checks weather a variable is a number..

Post your comment

Subject:
Message:
0/1000 characters