If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Write text to file without the Quotes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-01-06, 15:08
JerryDal JerryDal is offline
Registered User
 
Join Date: Jan 2002
Location: Bay Area
Posts: 473
Write text to file without the Quotes

I would like to write a batch file from VBA but without the quotes. Here is some of the code followed by the results:
HTML Code:
Open myBatFileName For Output As #1
Write #1, "@Echo Off"
Write #1, "cd\"
Batch file:
"@Echo Off"
"cd\"

Thanks.
Jerry
Reply With Quote
  #2 (permalink)  
Old 11-01-06, 18:05
JerryDal JerryDal is offline
Registered User
 
Join Date: Jan 2002
Location: Bay Area
Posts: 473
Here is the VBA solution to writing a text file without each line of text being surrounded by quotes:
HTML Code:
Open myBatFileName For Binary Access Write As #1
Put #1, , "@Echo Off" & vbNewLine
Put #1, , "cd\" & vbNewLine
Close #1
Results:
@Echo Off
cd\

Jerry
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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