by Raghuraja. C (21 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th February 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Function to Check the Passed string has Single or Double Quote and returns True or False
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
No comments have been posted about Function to Check the Passed string has Single or Double Quote and returns True or False. Why not be the first to post a comment about Function to Check the Passed string has Single or Double Quote and returns True or False.