+ Reply to Thread
Results 1 to 2 of 2

Check Number of Files in Directory

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Leeds, England
    MS-Off Ver
    MS Office 2007
    Posts
    134

    Check Number of Files in Directory

    I have a directory in a macro called 1Folder.

    How can I check if 1Folder has 24 files in it, and if yes then proceed, but if not display a message box and stop the macro?

    Thanks!
    dvent

  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
    Hello dvent,

    You can use the File System Object to return the files in a specified folder.
    Please Login or Register  to view this content.
    Macro Example
    Change the folder path to the one you want to check.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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