Insert inverted comma ("") into string visual basic
Dim str As String
str = "*.doc" & "," & "*.docx"
I want the textbox show "*.doc" & "," & "*.docx"
Write the string as you want it represented:
str = "*.doc" & "," & "*.docx"
double the quotes to escape them:
str = ""*.doc"" & "","" & ""*.docx""
then quote the string entire:
str = """*.doc"" & "","" & ""*.docx"""
?str
"*.doc" & "," & "*.docx"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With