Skip to content

Instantly share code, notes, and snippets.

@stevesohcot
Created July 27, 2021 14:46
Show Gist options
  • Select an option

  • Save stevesohcot/43a77d00ab1784ed2d3766e2b586fb7d to your computer and use it in GitHub Desktop.

Select an option

Save stevesohcot/43a77d00ab1784ed2d3766e2b586fb7d to your computer and use it in GitHub Desktop.
VBA Replace Single Quote
Public Function ReplaceSingleQuote(str As String) As String
If Len(Trim(str)) > 0 Then
ReplaceSingleQuote = Replace(str, "'", "''")
Else
ReplaceSingleQuote = str
End If
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment