Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotation marks in vbscript

Status
Not open for further replies.

STEWARTH

MIS
Mar 26, 1999
75
GB
How would I go about replacing a string with one containing quotation marks?

The replacement string is:

UpdateType="Planner" FPTCursor="USER" FPTField="IS_PLANNERNUMBER" SiebelBO="Employee" SiebelBC="Employee"

I need to get VBscript to interpret the quotation marks as part of the string itself.

Thanks in advance.
 
Dim QuoteChar
QuoteChar = Chr(34)

MyString = QuoteChar & "Test This" & QuoteChar

Returns "Test This" as the complete string
 
SiebelBC="My Only Employee"
Msgbox SiebelBC

displays My Only Employee

SiebelBC="My ""Only"" Employee"
Msgbox SiebelBC

displays My "Only" Employee

Or use the ASC keycodes and string concatenation as rormeister demonstrated. Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top