Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default printing a quotation mark in a text file

Hello,

please help with producing something like this in a text file from VBA:

aaa "bbb"

I am trying with

exestr="aaa \"bbb\""
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\qq.bat", True)
a.writeline (exestr)
a.Close

It is a question of escaping characters in VBA. Or if you could tell me how
to pass an argument containing spaces to a script (python,perl,R) from VBA?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default printing a quotation mark in a text file

I'd use chr(34) as the double quotes

"stephen" wrote:

Hello,

please help with producing something like this in a text file from VBA:

aaa "bbb"

I am trying with

exestr="aaa \"bbb\""
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\qq.bat", True)
a.writeline (exestr)
a.Close

It is a question of escaping characters in VBA. Or if you could tell me how
to pass an argument containing spaces to a script (python,perl,R) from VBA?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default printing a quotation mark in a text file

Try this exestr=""" & "aaa \"bbb\" & """ &

"stephen" wrote:

Hello,

please help with producing something like this in a text file from VBA:

aaa "bbb"

I am trying with

exestr="aaa \"bbb\""
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\qq.bat", True)
a.writeline (exestr)
a.Close

It is a question of escaping characters in VBA. Or if you could tell me how
to pass an argument containing spaces to a script (python,perl,R) from VBA?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default printing a quotation mark in a text file

Oops this works better!

exestr = "aaa\" & """" & "bbb\" & """"

"JRForm" wrote:

Try this exestr=""" & "aaa \"bbb\" & """ &

"stephen" wrote:

Hello,

please help with producing something like this in a text file from VBA:

aaa "bbb"

I am trying with

exestr="aaa \"bbb\""
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\qq.bat", True)
a.writeline (exestr)
a.Close

It is a question of escaping characters in VBA. Or if you could tell me how
to pass an argument containing spaces to a script (python,perl,R) from VBA?

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
Save Excel file to CSV with quotation mark data delimeter? Eric Excel Discussion (Misc queries) 2 December 9th 08 04:05 PM
Single Quotation mark in CSV hon123456 Excel Discussion (Misc queries) 1 November 29th 08 07:49 AM
Excel CSV file: How to preserve double quotation mark on Unix ftp? Shannona Excel Discussion (Misc queries) 2 October 3rd 06 07:54 PM
how do I concatenate text that has a quotation mark sparkroms Excel Discussion (Misc queries) 2 July 8th 05 09:20 PM
chr() for quotation mark Todd Huttenstine Excel Programming 7 July 29th 04 08:14 PM


All times are GMT +1. The time now is 10:44 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"