View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Count number of files in a folder

Dim FSO As Object

Set FSO = CreateObject("Scripting.FileSystemObject")
Debug.Print FSO.GetFolder("C:\Test").Files.Count

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CAM" wrote in message
...
Hello,

I am using Excel 2003 and I like to make a macro that will count the

number
of Excel files and displays the number in Excel from a particular folder
before I print all the files from the folder. Another words if there is 10
files in folder "Test" I like to show that number in Excel. How do I do
that. Any website to visit or help will be appreciated. Thank you in
advance.