I want to have visual basic give out quotes in text but to do so i need to put that in quotes For EX
textbox1.text = "Example"red""
but what it does is counts it as two separate quotes
with the word RED in the middle for no reason giving an error HELP PLEASE
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
A pair of double-quote marks with nothing between them translates to a displayable double-quote mark. In other words,
MsgBox """This is a test"""
will produce a message box with "This is a test" in it.
Hope that helps.
josh is right, because the computer thinks that the quote before red is the quote that is ending the example string
Double the quote marks you prefer to maintain. In different words: "del( ""C:UsersKidsDesk..."") " ) whilst this occurs interior a string, it gets retained as a lone quote mark. wish that facilitates.
textbox1.text = chr(34) & "Example red" & chr(34)
The CHR(34) is a quote to VB.
this is the correct result
Textbox1.text= "example ""red"""