Replacing parenthesis?

  • Thread starter Thread starter Mike Cooper
  • Start date Start date
M

Mike Cooper

Hi all,

I'm sure this is a really simple question for most.

Below is a line of my code that doesn't work:

SampleMacro = Replace(SampleMacro, ")", "")

The error is "Too Many parenthesis" even though the target of my
replace command is in quotes. When I change the right parenthesis in
quotes to a letter or integer it works fine. Good ol' .net 2003 is
still seeing the right parenthesis as a programming parameter despite
the quotes.

Is there something else I need to do to identify the ")" as the object
of the search?

Thank you,
Mike Cooper
 
Hi Mike,

I can paste it in my IDE and than let it run when I make the samplemacro a
string.
Did you type it completly in again?

Cor
 
* (e-mail address removed) (Mike Cooper) scripsit:
I'm sure this is a really simple question for most.

Below is a line of my code that doesn't work:

SampleMacro = Replace(SampleMacro, ")", "")

The error is "Too Many parenthesis" even though the target of my

I am not able to repro that. I recently had a similar problem which
caused me to retype the string literal or the whole statement.
 
Back
Top