how to use (double) quotation mark as string in codes?

V

ViestaWu

Dear everyone,

double quotation mark (") is a reserved word in VB, but I need show it via
msgbox. How Can I do it?

Tks & BR
Viesta
Shanghai, China
 
D

Dave Patrick

MsgBox """Quoted response"""

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Dear everyone,
|
| double quotation mark (") is a reserved word in VB, but I need show it via
| msgbox. How Can I do it?
|
| Tks & BR
| Viesta
| Shanghai, China
|
|
 
V

ViestaWu

Hello Dave,

It works well. But I couldn't understand its syntax. could you explain to me?

BR
Viesta
 
B

Bob Phillips

You have to tell VBA that the quotes are part of the string, not a string
delimiter, so you pass it once to start the string, and then another two to
say this is to be included. At the end, it works the other way, two to say
this is a quotes to include, one to close the string.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

ViestaWu said:
Hello Dave,

It works well. But I couldn't understand its syntax. could you explain to me?

BR
Viesta

Dave Patrick said:
MsgBox """Quoted response"""

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Dear everyone,
|
| double quotation mark (") is a reserved word in VB, but I need show it via
| msgbox. How Can I do it?
|
| Tks & BR
| Viesta
| Shanghai, China
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top