ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Putting Quotes in for XML (https://www.excelbanter.com/excel-programming/297830-putting-quotes-xml.html)

Rone

Putting Quotes in for XML
 
I'm trying to build an XML file using VBA. I want to put something like this in a string variable: <FORM Name="Rones Form"</FORM

The problem I'm having is with the quotes. Because its already in a string ( strXML = "<FORM Name=XXX") when I put the quotes in where the name of the form gose it fails. In Unix Shell I could place an escape character which would allow me to do stuff like this. Anyone got any ideas how to do this in VB



JE McGimpsey

Putting Quotes in for XML
 
To include double quotes, double them:

strXML = "<FORM Name=""XXX"""


In article ,
"Rone" wrote:

I'm trying to build an XML file using VBA. I want to put something like this
in a string variable: <FORM Name="Rones Form"</FORM

The problem I'm having is with the quotes. Because its already in a string (
strXML = "<FORM Name=XXX") when I put the quotes in where the name of the
form gose it fails. In Unix Shell I could place an escape character which
would allow me to do stuff like this. Anyone got any ideas how to do this in
VB?


Rone

Putting Quotes in for XML
 
Nevermind...I fout that the following will work: strQuote = """". This displays a ", which is what I needed.


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com