+ Reply to Thread
Results 1 to 5 of 5

VBA Count the Files in a Folder

  1. #1
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    VBA Count the Files in a Folder

    I am trying to pull the count on how many files are in a certain folder. I have a list of the folder names in column A and want the count in column B. I am having trouble with the code I have right now.

    Please Login or Register  to view this content.
    I am new to VBA, so when I use this macro nothing happens.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA Count the Files in a Folder

    Hello KColgrove,

    Here is one way to do it...

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    Re: VBA Count the Files in a Folder

    This worked for me. I know this wasn't the original question asked, but it there a way to hover over the number and it display what the files are?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA Count the Files in a Folder

    Hello KColgrove,

    This version of the macro adds a Comment to each cell in column "B" to display the files when you mouse over the cell.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    Re: VBA Count the Files in a Folder

    That works perfectly. Thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Count number of rows of all files in folder
    By resulgul in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-07-2023, 01:06 AM
  2. VBA loop through all the files in the folder and count the used rows
    By Andy308 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-14-2016, 10:04 AM
  3. Replies: 2
    Last Post: 06-01-2012, 07:40 AM
  4. count files in a folder automatically??
    By benjii19 in forum Excel General
    Replies: 13
    Last Post: 03-01-2011, 11:32 AM
  5. count the number of files in a specified folder
    By bambino86 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-04-2009, 12:55 PM
  6. Folder Inventory & Count for like named files
    By sdnicsm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2005, 08:23 PM
  7. [SOLVED] Count files in folder
    By gmunro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2005, 06:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1