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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Escaping quotation marks in SendKeys

Status
Not open for further replies.

rgm33

Technical User
Jul 27, 2006
10
CA
Hello,

I am trying to send quotation marks in a sendkeys(). The help files say to use curly brackets {} but I get an error.

I need to send the following command:

change "foo" "bar" all

According to help file I think I should be able to do this:

Code:
SendKeys("change {"}foo{"} {"}bar{"} all<enter>")

I get an "{ unrecognized" type error.

Anybody know the best way to do this?

Thanks,
 
SendKeys("change "& chr(34) & "foo" & chr(34) & " " & chr(34) & " " & "bar" &chr(34) & " all<enter>")

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Thanks, that did the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top