Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to run this line of code which obviously doesn't work.
MyString = " " " + "Hello" + " " " debug.print MyString what I am trying to end up with is "Hello" as my string QUOTES INCLUDED as part of the string. however every time I try to use them as part of a string VBA thinks that Im using them as a qualifer. Can anyone help me out with this one ? Thanks, Dan Thompson |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For a quote between quotes, use two quotes, like in
?" "" " + "Hello" + " "" " -- Kind regards, Niek Otten Microsoft MVP - Excel "Dan Thompson" wrote in message ... |I am trying to run this line of code which obviously doesn't work. | | MyString = " " " + "Hello" + " " " | debug.print MyString | | what I am trying to end up with is | | "Hello" as my string QUOTES INCLUDED as part of the string. | however every time I try to use them as part of a string VBA thinks that Im | using them as a qualifer. | | Can anyone help me out with this one ? | | Thanks, Dan Thompson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dan,
You can also create a variable to equal a double quote. For example, str_dblquote = chr(34) where chr(34) is a double quote. then try str_dblquote + "Hello" + str_dblquote which will print "Hello" Good luck! "Niek Otten" wrote: For a quote between quotes, use two quotes, like in ?" "" " + "Hello" + " "" " -- Kind regards, Niek Otten Microsoft MVP - Excel "Dan Thompson" wrote in message ... |I am trying to run this line of code which obviously doesn't work. | | MyString = " " " + "Hello" + " " " | debug.print MyString | | what I am trying to end up with is | | "Hello" as my string QUOTES INCLUDED as part of the string. | however every time I try to use them as part of a string VBA thinks that Im | using them as a qualifer. | | Can anyone help me out with this one ? | | Thanks, Dan Thompson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search/Match/Find ANY part of string to ANY part of Cell Value | Excel Worksheet Functions | |||
How do I include part of a cell in text (string?) in another cell? | Excel Worksheet Functions | |||
how to use (double) quotation mark as string in codes? | Excel Programming | |||
Passing string arguments that have quotation marks in them | Excel Programming | |||
How to include a double quotation character in a string? | Excel Programming |