Answers for "vba unquote"

VBA
0

vba unquote string

' Removes quotes or other character from string (first and last character)
Public Sub Unquote(ByRef pText As String, Optional ByVal pQuote As String = """")
    If IsEmpty(pText) Then
        Exit Sub
    End If
    If Len(pText) > 1 Then
        If Left(pText, 1) = pQuote Then
            pText = Right(pText, Len(pText) - 1)
        End If
    End If
    If Len(pText) > 1 Then
        If Right(pText, 1) = pQuote Then
            pText = Left(pText, Len(pText) - 1)
        End If
    End If
End Sub
Posted by: Guest on February-10-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language