- Home
·
- Miscellaneous
·
- Function to Check the Passed string has Single or Double Quote and returns True or False
Function to Check the Passed string has Single or Double Quote and returns True or False
Function to Check the Passed string has Single or Double Quote and returns True or False
Rate Function to Check the Passed string has Single or Double Quote and returns True or False
(1(1 Vote))
On Error GoTo LOCALERRORHANDLER
'Checks the supplied string to see if it contains
'both single and double quotes
fnCheckQuotes = False
'Contains a double quote
If InStr(1, str, Chr(34), vbTextCompare) <> 0 Then
'Contains a single quote
If InStr(1, str, Chr(39), vbTextCompare) <> 0 Then
fnCheckQuotes = True
End If
End If
Exit Function
LOCALERRORHANDLER:
End Function
Function to Check the Passed string has Single or Double Quote and returns True or False Comments
No comments yet — be the first to post one!
Post a Comment