I am trying to concatenate a double quote to indicate a range in Excel VBA but it gives me an error and I cannot identify it.
Var1 = "K12"
Var2 = "K554"
Rango = Var1 & ":"& Var2
When printing it, it gives me K12:K554
But I want this to come out ---> "K12:K554"
Quotes are escaped with... other quotes
For example,
MsgBox """"
it will show you"
. In that expression are the two quotes that indicate the start and end of the string, the quotes that you want to paint, and the quotes that precede them to escape them.In your code it would be
It can also be used
Chr(34)
to render quotes without thinking of escaping anything.