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