Saturday, May 27, 2017

Nested Quotes

prefer creating a global variable: Public Const vbDoubleQuote As String = """" 'represents 1 double quote (") Public Const vbSingleQuote As String = "'" 'represents 1 single quote (') and using it like so: Shell "explorer.exe " & vbDoubleQuote & sPath & vbDoubleQuote, vbNormalFocus


"" creates a quote character


CHR(34) creates a quote character CHAR() is used as an Excel cell formula, e.g. writing "=CHAR(34)" in a cell, but for VBA code you use the CHR() function

No comments:

Post a Comment