|
-
Sep 10th, 2000, 11:33 PM
#1
Thread Starter
Conquistador
how do i find out if the first letter of a string is a number?
-
Sep 10th, 2000, 11:45 PM
#2
Thread Starter
Conquistador
don't worry i've figured it out
Code:
Private Sub Form_Load()
MsgBox CheckNumber("01243")
End Sub
Function CheckNumber(strString As String) As Boolean
Dim myAsc As Integer
myAsc = Asc(strString)
If myAsc >= 48 And myAsc <= 57 Then
CheckNumber = True
Else
CheckNumber = False
End If
End Function
-
Sep 11th, 2000, 12:39 AM
#3
Fanatic Member
How about
Code:
If IsNumeric(Left$(My_String,1)) = True Then
'It's numeric !
Else
' It's Not !
End If
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Sep 11th, 2000, 04:09 AM
#4
Thread Starter
Conquistador
ok, that way is easier but i didn't know about it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|