Hey guys!

I need to use quotes inside a string variable... but I don't know how.
If I simply put double quotes at the start and at the end, the program interprets it as a closed interval, like if every quote is a string.

What can I do? I've searched here, but none of the results seems to be related with VB.net.

Thanks in advance!

ways i know:

Dim strQuote As String = "text"""
result would be text"

Dim strQuote As String = "text" & Chr(34)
retsult would be text"

Nice.

I'll try add Chr(34) at the begin and at the end of the string, will see if it works.

Thanks for the quick response, I'll post here if works (:

ive read before that you can use html encoding. im not sure how that works tho

if the above doesnt work then do a google search for html encoding " vb.net

might help more

Don't need to search, worked perfectly.

Just added & Chr(34) at the end and at the begin:

Argumentos = "a" & " " & NomedoBackup & " " & Chr(34) & Perfil & "\Folder with spaces\" & Chr(34)

Easy solution that I'll never forget. Thank you!

Edited 5 Years Ago by RenanLazarotto: n/a

This question has already been answered. Start a new discussion instead.