View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JRForm JRForm is offline
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?