업무 자동화/VBA VB.Net Code

특수 문자 제거 함수

ToolBOX01 2021. 2. 23. 09:11

 

Function RemoveSpecial(Str As String) As String
'updatebyExtendoffice 20160303
    Dim xChars As String
    Dim I As Long
    xChars = "#$%()^*&"
    For I = 1 To Len(xChars)
        Str = Replace$(Str, Mid$(xChars, I, 1), "")
    Next
    RemoveSpecial = Str
End Function

 

 

사용 방법

oAddress = Target.Address

RemoveSpecial (oAddress)