How to include a double quotation character in a string?

G

Georgee

Hi!

My string has to include double quotation characters in a string.
For instance following sentence I need to code into string:

Elements "abc", "acb", "cba" are the solution.

How to code it so VB does not interpret double quotation characters as
an end or begining of the string?

George
 
T

Trevor Shuttleworth

George

try:

Sub test()
Dim sString As String
sString = "Elements ""abc"", ""acb"", ""cba"" are the solution."
MsgBox sString
End Sub

Regards

Trevor


Hi!
My string has to include double quotation characters in a string.
For instance following sentence I need to code into string:

Elements "abc", "acb", "cba" are the solution.

How to code it so VB does not interpret double quotation characters as an end or begining of the string?

George
 
G

Georgee

Thanks for the solution but it is not working for me, this string is
being generated by looping and multiple concatenation of variable &
Activesheet Name and do not take extra "" cahracters

For parTabStep = 1 To 12

Sheets(arrTabs(parTabStep)).Select

If Cells(1, 1) = 3 Then

parThreePage = parThreePage & ", " ActiveSheet.Name

EndIf

Next
I hope I have clearly explained my problem.

George
 

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