Public Function SQLAddBrackets (ByVal varReplaceStringValue As Variant) As String
On Error GoTo Error_Function
Let xstrReplaceStringValue = Replace(Nz(varReplaceStringValue, ""), _
"[", "[[]", 1, -1, vbTextCompare)
Let xstrReplaceStringValue = Replace(Nz(varReplaceStringValue, ""), _
"*", "[*]", 1, -1, vbTextCompare)
Let xstrReplaceStringValue = Replace(Nz(varReplaceStringValue, ""), _
"#", "[#]", 1, -1, vbTextCompare)
Let xstrReplaceStringValue = Replace(Nz(varReplaceStringValue, ""), _
"?", "[?]", 1, -1, vbTextCompare)
Let SQLAddBrackets = varReplaceStringValue
Exit_Function:
Err.Clear
Exit Function
Error_Function:
Let SQLAddBrackets = xstrReplaceStringValue
Resume NextEnd Function
![Inline image 1](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicwNMWF6Cd87ghJRBlvUG68MwmSsPiHyf3zMADjWLb9RZN92NS6uZt3mWdjS3-fstPCnaM_IEygavcSsGLXtJ63m0eSXayRUjtulGaPUAiIwAS9loWp9v5QkWb1C32K9tCE1O-kJy52u-w/s640/Signature_Andre_Luiz_Bernardes_003-720178.png)
Nenhum comentário:
Postar um comentário