Philip is of course right.
Your error has *NOTHING* to do with the REPLACE call.
Your error is on *THIS* line:
Code:
strMyVariable = "NEW Craftsman Microtork 3/8" Torque Wrench"
Just create an ASP page with *ONLY* that line in it. Nothing more:
Code:
<%
strMyVariable = "NEW Craftsman Microtork 3/8" Torque Wrench"
%>
You *WILL* get a COMPILER error. And when you get a compiler error, that means the code will not even *BEGIN* to run. You must get rid of all compiler errors before a page can even start to make calls to functions like REPLACE.
So listen to the advice you have been given. *IT IS CORRECT*.
BUT...
But do *NOT* listen to the suggestions that you do
Code:
strMyVariable = Replace(strMyVariable, Chr(34), Chr(39))
If you do that, your MsgBox would then display
Quote:
|
NEW Craftsman Microtork 3/8' Torque Wrench
|
And I am SURE that you don't want a 3/8 of a FOOT torque wrench.