Public Function FastCut(s As String)
'returns first n chars which fit pattern *nn?
Dim x As Long
Dim flag As Boolean
Dim a As String
For x = 1 To Len(s)
a = a & Mid(s, x, 1)
If IsNumeric(Right(a, 1)) Then flag = True
If (flag And Not IsNumeric(Right(a, 1))) Then Exit For
Next x
FastCut = a
End Function
↧
Can someone explain what this code is doing line by line?
↧