Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
concatenating " (double quote) in a string???
#1
Solved: 11 Years, 3 Months, 4 Weeks ago Rolleyes 
Hi,

How can I concatenate a string variable with " (double quote)??

For example:

strValue1 = "The link is "

Now I want this string to be" "The link is "Click Me"."

for that I would want "Click Me". to be appended to the strValue1 string.

How do I do that with QTP? Is it even possible to have " in your string?

Thank you!

Moderator Note: Here are the Two ways to Escape (or Concatenate) a double quote in VBScript 
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Code:
strValue1 = "The link is "
strNewvalue=strValue1 & chr(13) &"Click Me"&d Chr(13)
msgbox strNewvalue


Happy Tester,
Byzoor,
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Oh yeah. It didnt strike meSad. Thanks.

Just a minor correction though... it should be chr(34) for double quote.
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
And another way of suppressing double quote's qtp meaning is by adding an additional double quote
strValue1 = "The link is ""Click Me"" "
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DataGrid: double click on selected row robertosalemi 0 4,428 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Replace a string in a word document with another string rekha.naik 8 15,484 11-14-2013, 12:58 PM
Last Post: pranikgarg
  How to tell QTP to ignore "quote" thing and dont evaluate it when using Descriptive P chong67 1 3,253 08-21-2012, 05:26 PM
Last Post: Ankesh
  Concatenating counter and object value Anum Saleem 3 3,509 02-21-2012, 11:41 AM
Last Post: Anum Saleem
  Double - Click on oracle Form field razaqa 9 12,256 08-20-2010, 03:48 AM
Last Post: ki108

Forum Jump:


Users browsing this thread: 2 Guest(s)