<?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 Re: Reading text files in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303704#M64906</link>
    <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;A&gt;&lt;BR /&gt;
href="http://www.afralisp.com/vba/extext.htm"&amp;gt;http://www.afralisp.com/vba/extext.htm&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE dir="ltr"&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"chrisbristol" &amp;lt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:chris.bristol@kvaerner.com"&amp;gt;chris.bristol@kvaerner.com&lt;/A&gt;&amp;gt; &lt;BR /&gt;
  wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f151435.-1@WebX.maYIadrTaRb"&amp;gt;news:f151435.-1@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;Hi, &lt;BR /&gt;
  &lt;BR /&gt;I am new to VBA, can someone point me in the right direction. I want to &lt;BR /&gt;
  read in a text file and create a schedule. Is it better to read the file into &lt;BR /&gt;
  a record or read each line and get each word out of each line. &lt;BR /&gt;Is there a &lt;BR /&gt;
  function like split that will read a text line and return each word to EOL &lt;BR /&gt;
  &lt;P&gt;Any help would be great. &lt;BR /&gt;Thanks Chris&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 24 Mar 2003 04:44:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-03-24T04:44:44Z</dc:date>
    <item>
      <title>Reading text files</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303702#M64904</link>
      <description>Hi,&lt;BR /&gt;
I am new to VBA, can someone point me in the right direction. I want to read in a text file and create a schedule. Is it better to read the file into a record or read each line and get each word out of each line.&lt;BR /&gt;
Is there a function like split that will read a text line and return each word to EOL&lt;BR /&gt;
&lt;BR /&gt;
Any help would be great.&lt;BR /&gt;
Thanks Chris</description>
      <pubDate>Sun, 23 Mar 2003 15:06:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303702#M64904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-23T15:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text files</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303703#M64905</link>
      <description>Chris,   &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
I'm not sure what you mean by a 'schedule' so my answers will be generic.  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
You can read either by line or field or character(s).  You can only read by field if the line is comma-delimited.  I've been using VB for years so tend to use what I know which is Open / Input # / Line Input #, however there is a more modern method using TextStream / Read / ReadLine / ReadAll.  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
Which method you choose depends on what you want to do with the information.  If you need to process 'words' then you can indeed use the native Split function.  If the contents of each word is irrelevant then I would use one of the 'chunkier' methods.  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
You'll find all these methods in the VBA Online Help.  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
Regards  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
Wayne Ivory  &lt;BR /&gt;&lt;BR /&gt;
IT Analyst Programmer  &lt;BR /&gt;&lt;BR /&gt;
Wespine Industries Pty Ltd  &lt;BR /&gt;</description>
      <pubDate>Sun, 23 Mar 2003 17:57:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303703#M64905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-23T17:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text files</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303704#M64906</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;A&gt;&lt;BR /&gt;
href="http://www.afralisp.com/vba/extext.htm"&amp;gt;http://www.afralisp.com/vba/extext.htm&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE dir="ltr"&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"chrisbristol" &amp;lt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:chris.bristol@kvaerner.com"&amp;gt;chris.bristol@kvaerner.com&lt;/A&gt;&amp;gt; &lt;BR /&gt;
  wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f151435.-1@WebX.maYIadrTaRb"&amp;gt;news:f151435.-1@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;Hi, &lt;BR /&gt;
  &lt;BR /&gt;I am new to VBA, can someone point me in the right direction. I want to &lt;BR /&gt;
  read in a text file and create a schedule. Is it better to read the file into &lt;BR /&gt;
  a record or read each line and get each word out of each line. &lt;BR /&gt;Is there a &lt;BR /&gt;
  function like split that will read a text line and return each word to EOL &lt;BR /&gt;
  &lt;P&gt;Any help would be great. &lt;BR /&gt;Thanks Chris&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 24 Mar 2003 04:44:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303704#M64906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-24T04:44:44Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303705#M64907</link>
      <description>Is the split funtion available in all versions of VBA?&lt;BR /&gt;
&lt;BR /&gt;
Tom Craft&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
wivory wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Chris,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I'm not sure what you mean by a 'schedule' so my answers will be&lt;BR /&gt;
&amp;gt; generic.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; You can read either by line or field or character(s). You can only&lt;BR /&gt;
&amp;gt; read by field if the line is comma-delimited. I've been using VB for&lt;BR /&gt;
&amp;gt; years so tend to use what I know which is Open / Input # / Line Input&lt;BR /&gt;
&amp;gt; #, however there is a more modern method using TextStream / Read /&lt;BR /&gt;
&amp;gt; ReadLine / ReadAll.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Which method you choose depends on what you want to do with the&lt;BR /&gt;
&amp;gt; information. If you need to process 'words' then you can indeed use&lt;BR /&gt;
&amp;gt; the native Split function. If the contents of each word is irrelevant&lt;BR /&gt;
&amp;gt; then I would use one of the 'chunkier' methods.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; You'll find all these methods in the VBA Online Help.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Wayne Ivory&lt;BR /&gt;
&amp;gt; IT Analyst Programmer&lt;BR /&gt;
&amp;gt; Wespine Industries Pty Ltd</description>
      <pubDate>Tue, 25 Mar 2003 12:38:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303705#M64907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-25T12:38:00Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303706#M64908</link>
      <description>No, Split is only a version 6 function.  However you can find a user-defined equivalent at this excellent site:  &lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
http://www.vb2themax.com/Item.asp?PageID=CodeBank&amp;amp;ID=194&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
Regards  &lt;BR /&gt;&lt;BR /&gt;
  &lt;BR /&gt;&lt;BR /&gt;
Wayne</description>
      <pubDate>Tue, 25 Mar 2003 16:56:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303706#M64908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-25T16:56:17Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303707#M64909</link>
      <description>&lt;PRE&gt;&lt;BR /&gt;
Input #File, TextLineCol1, TextLineCol2, TextLineColn ...&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
Joe&lt;BR /&gt;
--</description>
      <pubDate>Wed, 26 Mar 2003 06:36:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/reading-text-files/m-p/303707#M64909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-26T06:36:53Z</dc:date>
    </item>
  </channel>
</rss>

