View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Escape for special characters in string

The escape character is actually the doublequote itself "

As an example:
msgbox """"
Would display just the one doublequote.

Rob


"Jag Man" wrote in message
...
I want to be able to put:

.InsertLines StartLine, " sheetName = ActiveSheet.name & "sheetName""

to generate the code section of a button click procedure. The problem is

the
embeded
double quote. In C/C++ one would write the embedded double quote as \",
i.e., the
\ "escapes" the string interpretation to treat the followin character
literally.

Is there such a concept in VBA? I've tried putting Chr(42) but this does

not
generate the wanted
code.

Ed