Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all
Hopefully there is an easy fix to this infuriating problem. I need to include a string in my code which contains the character " - eg: msgbox("They call me Phil "The Power" Taylor") The problem is that when VBA sees " it takes it as the end of the string and I get a compile error. Has anybody come across this before, and is there a solution? Thanks JT |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox "They call me Phil ""The Power"" Taylor"
or preferable IMO MsgBox "They call me Phil 'The Power' Taylor" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "JT" wrote in message ... Hello all Hopefully there is an easy fix to this infuriating problem. I need to include a string in my code which contains the character " - eg: msgbox("They call me Phil "The Power" Taylor") The problem is that when VBA sees " it takes it as the end of the string and I get a compile error. Has anybody come across this before, and is there a solution? Thanks JT |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!
On Aug 29, 10:24*am, "Bob Phillips" wrote: MsgBox "They call me Phil ""The Power"" Taylor" or preferable IMO MsgBox "They call me Phil 'The Power' Taylor" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "JT" wrote in message ... Hello all Hopefully there is an easy fix to this infuriating problem. *I need to include a string in my code which contains the character " - eg: msgbox("They call me Phil "The Power" Taylor") The problem is that when VBA sees " it takes it as the end of the string and I get a compile error. Has anybody come across this before, and is there a solution? Thanks JT- Hide quoted text - - Show quoted text - |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can also use
MsgBox "They call me Phil " & Chr(34) & "The Power" & Chr(34) & " Taylor" On Aug 29, 3:16*pm, JT wrote: Thanks! On Aug 29, 10:24*am, "Bob Phillips" wrote: MsgBox "They call me Phil ""The Power"" Taylor" or preferable IMO MsgBox "They call me Phil 'The Power' Taylor" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "JT" wrote in message ... Hello all Hopefully there is an easy fix to this infuriating problem. *I need to include a string in my code which contains the character " - eg: msgbox("They call me Phil "The Power" Taylor") The problem is that when VBA sees " it takes it as the end of the string and I get a compile error. Has anybody come across this before, and is there a solution? Thanks JT- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
=SUBSTITUTE(C4,"~?#","") will this work to remove multiple string | Excel Worksheet Functions | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
text string: "91E10" in csv file auto converts to: "9.10E+11" | Excel Discussion (Misc queries) | |||
Easy Question "I think" Text with funtions in it??? | Excel Discussion (Misc queries) | |||
How do I find ""Easy Sum" Not Auto Sum | Excel Discussion (Misc queries) |