<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Reed from and write to TXT FILE in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351967#M42895</link>
    <description>HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program. &lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I need the program to reed the variables value from TXT file , Also I need to save the program result at text file , please tell me how can I reed and write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot</description>
    <pubDate>Sun, 12 Jun 2005 17:49:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-06-12T17:49:03Z</dc:date>
    <item>
      <title>Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351967#M42895</link>
      <description>HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program. &lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I need the program to reed the variables value from TXT file , Also I need to save the program result at text file , please tell me how can I reed and write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot</description>
      <pubDate>Sun, 12 Jun 2005 17:49:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351967#M42895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-12T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351968#M42896</link>
      <description>1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;</description>
      <pubDate>Sun, 12 Jun 2005 19:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351968#M42896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-12T19:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351969#M42897</link>
      <description>Try these samples,&lt;BR /&gt;
&lt;BR /&gt;
Public Sub WriteFile()&lt;BR /&gt;
  Open "C:\Testfile.txt" For Output As #1   'Open file for output&lt;BR /&gt;
  Write #1, "Hello World", 234                'Write comma-delimited data or &lt;BR /&gt;
variables a1,a2,...a10&lt;BR /&gt;
  Close #1                                                 'Close file&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ReadFile()&lt;BR /&gt;
Dim MyString, MyNumber&lt;BR /&gt;
&lt;BR /&gt;
  Open "C:\Testfile.txt" For Input As #1    'Open file for input&lt;BR /&gt;
&lt;BR /&gt;
  Do While Not EOF(1)                           'Loop until end of file&lt;BR /&gt;
    Input #1, MyString, MyNumber           'Read data into two variables &lt;BR /&gt;
a1,a2&lt;BR /&gt;
    Debug.Print MyString, MyNumber       'Print data to the Immediate window&lt;BR /&gt;
  Loop&lt;BR /&gt;
  Close #1                                                'Close file&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
      John Coon&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message &lt;BR /&gt;
news:4872637@discussion.autodesk.com...&lt;BR /&gt;
1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;&lt;/NOTREAL&gt;</description>
      <pubDate>Mon, 13 Jun 2005 10:31:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351969#M42897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T10:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351970#M42898</link>
      <description>Is there a reason you'd suggest this over the FileSystemObject of WSH?&lt;BR /&gt;
&lt;BR /&gt;
(Using FSO seems MUCH easier and logical, though I'm not as versed as many &lt;BR /&gt;
in here.)&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message &lt;BR /&gt;
news:4872637@discussion.autodesk.com...&lt;BR /&gt;
1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;&lt;/NOTREAL&gt;</description>
      <pubDate>Mon, 13 Jun 2005 10:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351970#M42898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T10:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351971#M42899</link>
      <description>I second the FileSystemObject approach. Go into help and do a search for&lt;BR /&gt;
"TextStream" and there should be an example for reading/writing to text&lt;BR /&gt;
files there.&lt;BR /&gt;
&lt;BR /&gt;
-Chris&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message&lt;BR /&gt;
news:4872637@discussion.autodesk.com...&lt;BR /&gt;
1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;&lt;/NOTREAL&gt;</description>
      <pubDate>Mon, 13 Jun 2005 19:10:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351971#M42899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T19:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351972#M42900</link>
      <description>Scripting.FileSystem object is not recommended to be used in VB/VBA program.&lt;BR /&gt;
There are lots of talks in various VB related NGs that are against using&lt;BR /&gt;
FileSystem object in VB/VBA program. It is designed for Windows scripting&lt;BR /&gt;
specifically, and many system administrators even choose to disable Win.&lt;BR /&gt;
script. With VB/VBA intrinsic file function, there is nothing you cannot do&lt;BR /&gt;
wihle with FileSystem object you can. Most experienced VB programmers would&lt;BR /&gt;
definitely avoid to use Scripting.FileSystem object in their VB/VBA program&lt;BR /&gt;
whenever they can.&lt;BR /&gt;
&lt;BR /&gt;
"Chris Shoemaker" &lt;CSS&gt; wrote in message&lt;BR /&gt;
news:4873461@discussion.autodesk.com...&lt;BR /&gt;
I second the FileSystemObject approach. Go into help and do a search for&lt;BR /&gt;
"TextStream" and there should be an example for reading/writing to text&lt;BR /&gt;
files there.&lt;BR /&gt;
&lt;BR /&gt;
-Chris&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message&lt;BR /&gt;
news:4872637@discussion.autodesk.com...&lt;BR /&gt;
1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;&lt;/NOTREAL&gt;&lt;/CSS&gt;</description>
      <pubDate>Mon, 13 Jun 2005 19:35:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351972#M42900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T19:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351973#M42901</link>
      <description>Hmmmm.....&lt;BR /&gt;
&lt;BR /&gt;
 &amp;gt;Most experienced VB programmers would definitely avoid to use&lt;BR /&gt;
Scripting.FileSystem object in their&lt;BR /&gt;
&amp;gt;VB/VBA program whenever they can.</description>
      <pubDate>Mon, 13 Jun 2005 19:56:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351973#M42901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T19:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351974#M42902</link>
      <description>So, so true.  Remember when the new security model hit those of us trying to do Outlook Web Access and scripting?</description>
      <pubDate>Mon, 13 Jun 2005 20:15:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351974#M42902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T20:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351975#M42903</link>
      <description>Nothing you can't do perhaps, but often at the expense of being 10X more&lt;BR /&gt;
complex then FSO for anything more advanced. Your point however about ease&lt;BR /&gt;
of use vs risk for just reading and writing to a text file though is a good&lt;BR /&gt;
one.&lt;BR /&gt;
&lt;BR /&gt;
-Chris&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message&lt;BR /&gt;
news:4873525@discussion.autodesk.com...&lt;BR /&gt;
Scripting.FileSystem object is not recommended to be used in VB/VBA program.&lt;BR /&gt;
There are lots of talks in various VB related NGs that are against using&lt;BR /&gt;
FileSystem object in VB/VBA program. It is designed for Windows scripting&lt;BR /&gt;
specifically, and many system administrators even choose to disable Win.&lt;BR /&gt;
script. With VB/VBA intrinsic file function, there is nothing you cannot do&lt;BR /&gt;
wihle with FileSystem object you can. Most experienced VB programmers would&lt;BR /&gt;
definitely avoid to use Scripting.FileSystem object in their VB/VBA program&lt;BR /&gt;
whenever they can.&lt;BR /&gt;
&lt;BR /&gt;
"Chris Shoemaker" &lt;CSS&gt; wrote in message&lt;BR /&gt;
news:4873461@discussion.autodesk.com...&lt;BR /&gt;
I second the FileSystemObject approach. Go into help and do a search for&lt;BR /&gt;
"TextStream" and there should be an example for reading/writing to text&lt;BR /&gt;
files there.&lt;BR /&gt;
&lt;BR /&gt;
-Chris&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message&lt;BR /&gt;
news:4872637@discussion.autodesk.com...&lt;BR /&gt;
1. Start Acad;&lt;BR /&gt;
2. Get into VBA Editor;&lt;BR /&gt;
3. Press "F1" key;&lt;BR /&gt;
4. Select "Index" tab and enter "Open";&lt;BR /&gt;
5. Double-click "Open Statement".&lt;BR /&gt;
&lt;BR /&gt;
You get detailed explanation on how to open a file for reading/writing and&lt;BR /&gt;
examples.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUDEIRI&gt; wrote in message news:4872659@discussion.autodesk.com...&lt;BR /&gt;
HI,&lt;BR /&gt;
I am using VBA editor inside AutoCAD  to write my program.&lt;BR /&gt;
in my program there are variables a1,a2,...a10. and when I run the program I&lt;BR /&gt;
need the program to reed the variables value from TXT file , Also I need to&lt;BR /&gt;
save the program result at text file , please tell me how can I reed and&lt;BR /&gt;
write from and to TXT file. looking for your help&lt;BR /&gt;
thank you alot&lt;/QUDEIRI&gt;&lt;/NOTREAL&gt;&lt;/CSS&gt;&lt;/NOTREAL&gt;</description>
      <pubDate>Mon, 13 Jun 2005 20:33:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351975#M42903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T20:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reed from and write to TXT FILE</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351976#M42904</link>
      <description>Thanks for the info, Norman.  My thought process was more along the lines of &lt;BR /&gt;
"if you're using Acad, it's on Windows".&lt;BR /&gt;
&lt;BR /&gt;
....enlightenment is always a good thing. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
"Norman Yuan" &lt;NOTREAL&gt; wrote in message &lt;BR /&gt;
news:4873525@discussion.autodesk.com...&lt;BR /&gt;
Scripting.FileSystem object is not recommended to be used in VB/VBA program.&lt;BR /&gt;
There are lots of talks in various VB related NGs that are against using&lt;BR /&gt;
FileSystem object in VB/VBA program. It is designed for Windows scripting&lt;BR /&gt;
specifically, and many system administrators even choose to disable Win.&lt;BR /&gt;
script. With VB/VBA intrinsic file function, there is nothing you cannot do&lt;BR /&gt;
wihle with FileSystem object you can. Most experienced VB programmers would&lt;BR /&gt;
definitely avoid to use Scripting.FileSystem object in their VB/VBA program&lt;BR /&gt;
whenever they can.&lt;/NOTREAL&gt;</description>
      <pubDate>Mon, 13 Jun 2005 21:31:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reed-from-and-write-to-txt-file/m-p/1351976#M42904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-13T21:31:58Z</dc:date>
    </item>
  </channel>
</rss>

