Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotation marks in a string
Hi,
I want to run a macro that writes out to a text file the following string: <gamma unit="DEG" 0.0 </gamma I've tried the following method: Write #1, "<gamma unit=""DEG"" 0.0 </gamma" But then I get exactly that: "<gamma unit=""DEG"" 0.0 </gamma" Of course, I don't want the double quotation marks, but only once (i.e., "DEG", not ""DEG""). Any hint will be greatly appreciated. Fabian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotation marks in a string
Well, I've just found the answer myself :)
Use Print instead of Write. Thanks Fabian. Fabian "Fabian Grodek" wrote: Hi, I want to run a macro that writes out to a text file the following string: <gamma unit="DEG" 0.0 </gamma I've tried the following method: Write #1, "<gamma unit=""DEG"" 0.0 </gamma" But then I get exactly that: "<gamma unit=""DEG"" 0.0 </gamma" Of course, I don't want the double quotation marks, but only once (i.e., "DEG", not ""DEG""). Any hint will be greatly appreciated. Fabian |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotation marks in a string
"<gamma unit=" & chr(34) & "DEG" & chr(34) & " 0.0 </gamma"
"Fabian Grodek" wrote in message ... Hi, I want to run a macro that writes out to a text file the following string: <gamma unit="DEG" 0.0 </gamma I've tried the following method: Write #1, "<gamma unit=""DEG"" 0.0 </gamma" But then I get exactly that: "<gamma unit=""DEG"" 0.0 </gamma" Of course, I don't want the double quotation marks, but only once (i.e., "DEG", not ""DEG""). Any hint will be greatly appreciated. Fabian |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotation marks in a string
Thanks Henry.
That's another option if I need to use the "Write" method anyway. Fabian "Henry Markov" wrote: "<gamma unit=" & chr(34) & "DEG" & chr(34) & " 0.0 </gamma" "Fabian Grodek" wrote in message ... Hi, I want to run a macro that writes out to a text file the following string: <gamma unit="DEG" 0.0 </gamma I've tried the following method: Write #1, "<gamma unit=""DEG"" 0.0 </gamma" But then I get exactly that: "<gamma unit=""DEG"" 0.0 </gamma" Of course, I don't want the double quotation marks, but only once (i.e., "DEG", not ""DEG""). Any hint will be greatly appreciated. Fabian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
quotation marks in string | Excel Programming | |||
VBA vlookup error depending on text string & quotation marks | Excel Programming | |||
without quotation marks? | Excel Discussion (Misc queries) | |||
Quotation Marks - When and What?? | Excel Discussion (Misc queries) | |||
Passing string arguments that have quotation marks in them | Excel Programming |