Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
VB Category Code
Real Name
:
SharingCode.NET User
Subject
:
Track Number In String Collection
Description
:
This simple program is very useful to track number (s) between alphabets and numbers. Very simple and easy code to understand or customize with your criteria.
'very simple code to track number in string 'example: 'text1: "kkkk123456khhh" 'result=123456 'text1: "kkkk123456789hkkhjj" 'result=123456789 'items required: 1 textbox named as text1, 1 label named as label1 'and 1 command button named as command1 'implemented by: Khairol via khairol.iz@gmail.com Private Function CheckNumb(s As String) As Boolean On Error GoTo err Dim i As Integer i = CDbl(s) CheckNumb = True Exit Function err: CheckNumb = False End Function Private Sub Command1_Click() Dim a, m, p As Integer Dim n, i As String p = 5 m = Len(Text1.Text) For a = 1 To m i = Mid(Text1.Text, p, 1) Do Until CheckNumb(i) = True Exit For Loop n = n & i a = a + 1 p = p + 1 Next a Label1.Caption = n End Sub
Rating
:
0.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks