Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50061

How to concatenate quotation marks and a string variable?

$
0
0
This one should be easy.

In VBA, what would be the proper syntax that would concatenate a quotation mark, a variable, and another quotation mark?

In my line of code:
Code:

Dim strFirstColorBarCell As String
Dim xVals As String

strFirstColorBarCell = Left(Range(xVals).Offset(0, 3).Address(0, 0), InStr(1, Range(xVals).Offset(0, 3).Address(0, 0), ":") - 1)

returns E67.

However, I want strFirstColorBarCell to evaluate as "E67", so I'd like to pass quotation marks before and after the part of the code that generates E67.

Thanks!
g

Viewing all articles
Browse latest Browse all 50061

Trending Articles