![]() |
How to include a double quotation character in a string?
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 |
How to include a double quotation character in a string?
George
try: Sub test() Dim sString As String sString = "Elements ""abc"", ""acb"", ""cba"" are the solution." MsgBox sString End Sub Regards Trevor "Georgee" wrote in message ... 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 |
How to include a double quotation character in a string?
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 Trevor Shuttleworth wrote: George try: Sub test() Dim sString As String sString = "Elements ""abc"", ""acb"", ""cba"" are the solution." MsgBox sString End SubRegards Trevor "Georgee" wrote in message ! 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 |
All times are GMT +1. The time now is 12:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com