ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   evalaute concatenation gives problems (https://www.excelbanter.com/excel-programming/360741-evalaute-concatenation-gives-problems.html)

srinu1264

evalaute concatenation gives problems
 

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...o&userid=34155
View this thread: http://www.excelforum.com/showthread...hreadid=539497


Ardus Petus

evalaute concatenation gives problems
 
MsgBox Evaluate("concatenate(""a"",""b"")")

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

Cordialement,
--
AP

"srinu1264" a écrit
dans le message de news:
...

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...o&userid=34155
View this thread: http://www.excelforum.com/showthread...hreadid=539497




Niek Otten

evalaute concatenation gives problems
 
msgbox evaluate("concatenate(""a"",""b"")")

--
Kind regards,

Niek Otten

"srinu1264" wrote in message
...
|
| 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...o&userid=34155
| View this thread: http://www.excelforum.com/showthread...hreadid=539497
|



srinu1264[_2_]

evalaute concatenation gives problems
 

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...o&userid=34155
View this thread: http://www.excelforum.com/showthread...hreadid=539497


Niek Otten

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

--
Kind regards,

Niek Otten

"srinu1264" wrote in message
...
|
| 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...o&userid=34155
| View this thread: http://www.excelforum.com/showthread...hreadid=539497
|




All times are GMT +1. The time now is 01:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com