我在模块中定义了一个函数
Option ExplicitPublic Function GetNumber(ByVal str As String)
    Dim i As Integer
    Dim tmp1 As String
    Dim tmp2 As String
    i = 1
    tmp1 = ""
    tmp2 = ""
    Do While Len(str) - i > 0
        tmp2 = Mid(str, i, 2)
        Select Case tmp2
            Case "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"
                tmp2 = Right(tmp2, 1)
            Case "2E"
                tmp2 = ","
            Case "20"
                tmp2 = " "
            Case Else
                MsgBox "数据('" & str & "')有误", vbOKOnly + vbExclamation, "错误"
                Exit Function
        End Select
        tmp1 = tmp1 + tmp2
        i = i + 2
    Loop
    str = tmp1
End Function函数经过验证没有问题
在程序中调用函数GetNumber(MyNum)却取不到数,也不报错,为什么?