Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
quotation marks in string Simon Lloyd[_898_] Excel Programming 0 December 1st 06 07:08 AM
VBA vlookup error depending on text string & quotation marks xlcharlie Excel Programming 2 July 19th 06 03:00 PM
without quotation marks? jfazz Excel Discussion (Misc queries) 1 March 2nd 06 04:43 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
Passing string arguments that have quotation marks in them Caro-Kann Defence[_2_] Excel Programming 2 April 21st 05 03:26 PM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"