evalaute concatenation gives problems

S

srinu1264

Hi

My code has the statement MsgBox Evaluate("concatenate("a","b")")
which is failing, can you suggest the proper escape sequence so that
this executes.

MsgBox Evaluate("sum(5,6)") is working fine
but MsgBox Evaluate("concatenate("a","b")") is failing because of "
mismatch.. please let me kow that is the proper escape character to be
given there.
 
A

Ardus Petus

MsgBox Evaluate("concatenate(""a"",""b"")")

Il faut doubler les " à l'intérieur d'un littéral.

Cordialement,
 
N

Niek Otten

msgbox evaluate("concatenate(""a"",""b"")")

--
Kind regards,

Niek Otten

|
| Hi
|
| My code has the statement MsgBox Evaluate("concatenate("a","b")")
| which is failing, can you suggest the proper escape sequence so that
| this executes.
|
| MsgBox Evaluate("sum(5,6)") is working fine
| but MsgBox Evaluate("concatenate("a","b")") is failing because of "
| mismatch.. please let me kow that is the proper escape character to be
| given there.
|
|
| --
| srinu1264
| ------------------------------------------------------------------------
| srinu1264's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=34155
| View this thread: http://www.excelforum.com/showthread.php?threadid=539497
|
 
S

srinu1264

Actually I am interested in taking the formula from the cell and
evaluating it myself in the program

my Target.Formula returns =Concatenate("a","b")
as you said that I have to use evaluate("Concatenate(""a"",""b"")") ,
then I need to replace the " in the formula by ""

I tried to use replace (formula,""",""""), which I mean replace " to ""
in the formula but it reports an error. I want to know what is the
escape character to remove the meaning of " or anyother characters . In
JAva and other languages we have \ as the escape. What is the escape
character in VBA
 
N

Niek Otten

Assign your formula string to a variable and evaluate the variable. No need for extra quotes then.

--
Kind regards,

Niek Otten

|
| Actually I am interested in taking the formula from the cell and
| evaluating it myself in the program
|
| my Target.Formula returns =Concatenate("a","b")
| as you said that I have to use evaluate("Concatenate(""a"",""b"")") ,
| then I need to replace the " in the formula by ""
|
| I tried to use replace (formula,""",""""), which I mean replace " to ""
| in the formula but it reports an error. I want to know what is the
| escape character to remove the meaning of " or anyother characters . In
| JAva and other languages we have \ as the escape. What is the escape
| character in VBA
|
|
| --
| srinu1264
| ------------------------------------------------------------------------
| srinu1264's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=34155
| View this thread: http://www.excelforum.com/showthread.php?threadid=539497
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top