1

allows文字がリストする機能(この場合)

Case 48 To 57, 65 To 90, 97 To 122:

Removeこれを代わりにリストされている文字に変更することは可能ですか?

ありがとう

Function AlphaNumericOnly(strSource As String) As String
    Dim i As Integer
    Dim strResult As String

    For i = 1 To Len(strSource)
        Select Case Asc(Mid(strSource, i, 1))
            Case 48 To 57, 65 To 90, 97 To 122:
                strResult = strResult & Mid(strSource, i, 1)
        End Select
    Next
    AlphaNumericOnly = strResult
End Function
4

1 に答える 1