![]() |
Count number of files in a folder
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. |
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. |
Count number of files in a folder
Thanks Bob,
I will give it a shot. "Bob Phillips" wrote in message ... 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. |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com