PC Review


Reply
Thread Tools Rate Thread

counting excel files

 
 
dstiefe
Guest
Posts: n/a
 
      13th Aug 2009
How do I count excel files that are not open

I want to put excel files in a folder ...then I want to first count the
number of files that are in the folder...

then open them

Thank you
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      13th Aug 2009
One way is to use DIR with a loop....

Sub Macro()
Dim strFolder As String, strFile As String
Dim intCount As Integer
strFolder = "d:\"
strFile = Dir(strFolder & "*.xls", vbNormal)
Do While strFile <> ""
intCount = intCount + 1
strFile = Dir
Loop
MsgBox intCount & " files found"
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"dstiefe" wrote:

> How do I count excel files that are not open
>
> I want to put excel files in a folder ...then I want to first count the
> number of files that are in the folder...
>
> then open them
>
> Thank you

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      13th Aug 2009
Check ou
http://excel2007tips.blogspot.com/20...h-in-2007.html

If this post helps click Yes
---------------
Jacob Skaria


"dstiefe" wrote:

> How do I count excel files that are not open
>
> I want to put excel files in a folder ...then I want to first count the
> number of files that are in the folder...
>
> then open them
>
> Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
counting excel files in a folder dstiefe Microsoft Excel Programming 4 13th Aug 2009 04:08 PM
counting files Bre-x Microsoft Access Getting Started 2 16th Jan 2009 05:44 PM
COUNTING FILES =?Utf-8?B?b3NpdG9ncmFuZGU=?= Windows XP General 4 10th Aug 2004 05:18 PM
Counting files in a folder Hawki Microsoft Excel Programming 7 14th Apr 2004 05:54 PM
counting files Edson Microsoft Windows 2000 CMD Promt 3 22nd Jan 2004 02:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 PM.