- Home
·
- String Manipulation
·
- Take out Numbers from a string that is characters and numbers mixed. The Numbers are in order they
Take out Numbers from a string that is characters and numbers mixed. The Numbers are in order they
Take out Numbers from a string that is characters and numbers mixed. The Numbers are in order they appear in the string. EX
API Declarations
'TextBox..................Text1
Rate Take out Numbers from a string that is characters and numbers mixed. The Numbers are in order they
(1(1 Vote))
'look at bla. if bla char is an integer then do not show it
'rather save the interger
Dim StringLength As Integer
Dim StringPossition As Integer
Dim WhatIsThis As String
Dim StringOut As String
Dim IntOut As String
StringLength = Len(bla)
StringPossition = 1
Do Until StringPossition = StringLength + 1
WhatIsThis = Mid(bla, StringPossition, 1)
If WhatIsThis = "0" Or WhatIsThis = "1" Or WhatIsThis = "2" Or WhatIsThis = "3" Or WhatIsThis = "4" Or WhatIsThis = "5" Or WhatIsThis = "6" Or WhatIsThis = "7" Or WhatIsThis = "8" Or WhatIsThis = "9" Then
IntOut = IntOut & WhatIsThis
Else
StringOut = StringOut & WhatIsThis
End If
StringPossition = StringPossition + 1
Loop
GetTheNumber = IntOut
End Function
Private Sub Command1_Click()
Text1.Text = NoIntegerString(Text1.Text)
End Sub
Take out Numbers from a string that is characters and numbers mixed. The Numbers are in order they Comments
No comments yet — be the first to post one!
Post a Comment