Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CAM CAM is offline
external usenet poster
 
Posts: 9
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
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.




  #3   Report Post  
Posted to microsoft.public.excel.programming
CAM CAM is offline
external usenet poster
 
Posts: 9
Default 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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count files in a folder Wanna Learn Excel Discussion (Misc queries) 4 July 9th 08 05:46 PM
Folder Inventory & Count for like named files theDude[_19_] Excel Programming 0 August 2nd 05 01:23 AM
Count files in folder gmunro Excel Programming 3 May 18th 05 10:44 PM
Count files in a Folder! SpeeD72 Excel Programming 1 September 11th 03 07:18 PM
Count files in a Folder! Bob Phillips[_5_] Excel Programming 0 September 11th 03 06:38 PM


All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"