提取字符串中的数字
'提取字符串中的数字
Function GetDigits(strText As String ) As String
Dim strChar As String , strMsg As String
Dim i As Long
strMsg = ""
For i = 1 To Len(strText)
strChar = Mid(strText, i, 1)
If strChar Like "#" Then strMsg = strMsg & strChar
Next
GetDigits = strMsg
End Function
效果: