<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The Dir Function</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-42691</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 09 Dec 2009 19:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-42691</guid>
		<description>&lt;p&gt;What happens if you know the file name but not the directory?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What happens if you know the file name but not the directory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Pereira Garcia</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-34806</link>
		<dc:creator>Eduardo Pereira Garcia</dc:creator>
		<pubDate>Tue, 16 Sep 2008 18:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-34806</guid>
		<description>&lt;p&gt;Great !!!&lt;br&gt;
Faster and Efficient.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great !!!<br />
Faster and Efficient.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: larry</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-27286</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Tue, 11 Sep 2007 21:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-27286</guid>
		<description>&lt;p&gt;Do you know of a short way to validate the format of a filename is a proper name before it is used on any VBA functions?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Do you know of a short way to validate the format of a filename is a proper name before it is used on any VBA functions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-15773</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Wed, 24 Aug 2005 10:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-15773</guid>
		<description>&lt;p&gt;A bit of an amateur on the old Excel and VBA but loving the things it can do! searching the net i wanted to find a way of linking workbooks together.&lt;br&gt;
i have three work books that contain various information and work indepently but on all the 3 workbooks there are 4 columns that share the same information.  what i want is some knid of command that send this information to my newly proposed 4th workbook capturing only the information of these 4 columns.&lt;br&gt;
i was thinking of either a VBA command button on the 4th &#039;new&#039; file that when pressed draws the information from the others or maybe an automatic funtion that when lets say the word &#039;complete&#039; is added to each of the individual 3 work books then this information is automatically inputted on the next available empty row on my newly created 4th.&lt;/p&gt;
&lt;p&gt;i really need help with the above and since my search on the net brought me to this sight then i guess it&#039;s a great place to start.  looking through some of the topics i think i&#039;ll be staying here for a while but as for now i really need some help with the above.&lt;/p&gt;
&lt;p&gt;hope you can help&lt;/p&gt;
&lt;p&gt;steve&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A bit of an amateur on the old Excel and VBA but loving the things it can do! searching the net i wanted to find a way of linking workbooks together.<br />
i have three work books that contain various information and work indepently but on all the 3 workbooks there are 4 columns that share the same information.  what i want is some knid of command that send this information to my newly proposed 4th workbook capturing only the information of these 4 columns.<br />
i was thinking of either a VBA command button on the 4th &#8216;new&#8217; file that when pressed draws the information from the others or maybe an automatic funtion that when lets say the word &#8216;complete&#8217; is added to each of the individual 3 work books then this information is automatically inputted on the next available empty row on my newly created 4th.</p>
<p>i really need help with the above and since my search on the net brought me to this sight then i guess it&#8217;s a great place to start.  looking through some of the topics i think i&#8217;ll be staying here for a while but as for now i really need some help with the above.</p>
<p>hope you can help</p>
<p>steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat O'Brien</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-4948</link>
		<dc:creator>Pat O'Brien</dc:creator>
		<pubDate>Thu, 06 Jan 2005 16:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-4948</guid>
		<description>&lt;p&gt;Just a quick caution....&lt;/p&gt;
&lt;p&gt;If you&#039;re using the DIR command to loop through files, and are calling other routines to process the files, the other routines cannot have their own DIR command used in them.&lt;/p&gt;
&lt;p&gt;This resets the location that the DIR command looks at and subsequent calls to DIR in the main routine will fail.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Just a quick caution&#8230;.</p>
<p>If you&#8217;re using the DIR command to loop through files, and are calling other routines to process the files, the other routines cannot have their own DIR command used in them.</p>
<p>This resets the location that the DIR command looks at and subsequent calls to DIR in the main routine will fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Staff</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-4944</link>
		<dc:creator>Harald Staff</dc:creator>
		<pubDate>Thu, 06 Jan 2005 12:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-4944</guid>
		<description>&lt;p&gt;Note also the optional parameter. Like&lt;/p&gt;
&lt;p&gt;Function FolderExists(sFolderPath As String) As Boolean&lt;br&gt;
FolderExists = (Dir(sFolderPath, vbDirectory) &lt;&gt; &quot;&quot;)&lt;br&gt;
End Function&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Note also the optional parameter. Like</p>
<p>Function FolderExists(sFolderPath As String) As Boolean<br />
FolderExists = (Dir(sFolderPath, vbDirectory) &lt;&gt; &#8220;&#8221;)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Salvador Ramos</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-4932</link>
		<dc:creator>Salvador Ramos</dc:creator>
		<pubDate>Wed, 05 Jan 2005 22:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-4932</guid>
		<description>&lt;p&gt;Very good!!!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Very good!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt H</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-1340</link>
		<dc:creator>Matt H</dc:creator>
		<pubDate>Fri, 16 Apr 2004 15:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-1340</guid>
		<description>&lt;p&gt;Useful function, Dick!  The first piece of code is easier to look at quickly and go, yeah, I understand what this does.  J.E.M&#039;s would probably run faster if you called the function hundreds or thousands of times.&lt;/p&gt;
&lt;p&gt;If you wanted to whittle it down even more, and avoid the len() and not() functions altogether:&lt;/p&gt;
&lt;p&gt;Function FileExists(sFilePath As String) As Boolean&lt;br&gt;
  FileExists = (Dir(sFilePath) &lt;&gt; &quot;&quot;)&lt;br&gt;
End Function&lt;/p&gt;
&lt;p&gt;The thing about this is that you have to look at it and think for a few minutes, what&#039;s really going on here?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Useful function, Dick!  The first piece of code is easier to look at quickly and go, yeah, I understand what this does.  J.E.M&#8217;s would probably run faster if you called the function hundreds or thousands of times.</p>
<p>If you wanted to whittle it down even more, and avoid the len() and not() functions altogether:</p>
<p>Function FileExists(sFilePath As String) As Boolean<br />
  FileExists = (Dir(sFilePath) &lt;&gt; &#8220;&#8221;)<br />
End Function</p>
<p>The thing about this is that you have to look at it and think for a few minutes, what&#8217;s really going on here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.E. McGimpsey</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-1339</link>
		<dc:creator>J.E. McGimpsey</dc:creator>
		<pubDate>Fri, 16 Apr 2004 12:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-1339</guid>
		<description>&lt;p&gt;Hi Dick!&lt;/p&gt;
&lt;p&gt;Don&#039;t know how many of your readers are MacXL users. The Windows wildcard characters (*, ?) are legal filename characters for Macs, so they can&#039;t be used with Dir(). Here&#039;s the equivalent cross-platform LoopThroughXLS, using conditional compilation:&lt;/p&gt;
&lt;p&gt;    Public Sub LoopThroughXLS()&lt;br&gt;
        Dim sFName As String&lt;br&gt;
        #If Mac Then&lt;br&gt;
            sFName = Dir(CurDir, MacID(&quot;XLS8?))&lt;br&gt;
        #Else&lt;br&gt;
            sFName = Dir(&quot;*.xls&quot;)&lt;br&gt;
        #End If&lt;br&gt;
        Do While Len(sFName) &gt; 0&lt;br&gt;
            Debug.Print sFName&lt;br&gt;
            sFName = Dir&lt;br&gt;
        Loop&lt;br&gt;
    End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick!</p>
<p>Don&#8217;t know how many of your readers are MacXL users. The Windows wildcard characters (*, ?) are legal filename characters for Macs, so they can&#8217;t be used with Dir(). Here&#8217;s the equivalent cross-platform LoopThroughXLS, using conditional compilation:</p>
<p>    Public Sub LoopThroughXLS()<br />
        Dim sFName As String<br />
        #If Mac Then<br />
            sFName = Dir(CurDir, MacID(&#8220;XLS8?))<br />
        #Else<br />
            sFName = Dir(&#8220;*.xls&#8221;)<br />
        #End If<br />
        Do While Len(sFName) &gt; 0<br />
            Debug.Print sFName<br />
            sFName = Dir<br />
        Loop<br />
    End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.E. McGimpsey</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/15/the-dir-function/#comment-1338</link>
		<dc:creator>J.E. McGimpsey</dc:creator>
		<pubDate>Fri, 16 Apr 2004 11:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=467#comment-1338</guid>
		<description>&lt;p&gt;Hi Dick!&lt;/p&gt;
&lt;p&gt;Just a personal preference: whenever a result is a boolean, I prefer avoiding the If...Then...End If structure:&lt;/p&gt;
&lt;p&gt;    Public Function FileExists(sFilePath As String) As Boolean&lt;br&gt;
        FileExists = Not  (Len(Dir(sFilePath)) = 0 )&lt;br&gt;
    End Function.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick!</p>
<p>Just a personal preference: whenever a result is a boolean, I prefer avoiding the If&#8230;Then&#8230;End If structure:</p>
<p>    Public Function FileExists(sFilePath As String) As Boolean<br />
        FileExists = Not  (Len(Dir(sFilePath)) = 0 )<br />
    End Function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

