Sunday, May 24, 2015

How to extract a number from alphanumeric text string.

str = "Guru1234"

for i = 1 to len(str)
  strValue = mid(str,i,1)
  if isnumeric(strValue) = True Then
      oTemp = oTemp & strValue
  End if
Next

msgbox oTemp

No comments:

Post a Comment