+ Reply to Thread
Results 1 to 3 of 3

Cycle through all .xlsb files in a folder in size order (largest first)

  1. #1
    Registered User
    Join Date
    10-31-2013
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    10

    Cycle through all .xlsb files in a folder in size order (largest first)

    Is it possible to create excel vba code to cycle through and open all .xlsb files in a particular folder starting with the largest filesize first?
    All methods I have seen so far use alpha order.
    Many thanks for any help you can give.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Cycle through all .xlsb files in a folder in size order (largest first)

    The only way I can think of doing it would be to first read in the names and sizes of all the xlsb files in the folder to a list, sort the list by size and then loop through the list opening the files.

    Something like this perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-31-2013
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Cycle through all .xlsb files in a folder in size order (largest first)

    Thank you so much for your prompt response.
    The code worked perfectly and I would never have thought to do it that way.

+ 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. VBA to list only new files in folder or in order
    By acowan2307 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-25-2021, 12:22 AM
  2. Counting files in folder including subfolders also and folder size
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 03:26 PM
  3. Macro to choose folder and cycle through all files
    By Mr.Pinches in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2011, 04:04 PM
  4. Getting number of files within a sub-folder and its size
    By Hari in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2006, 01:35 PM
  5. [SOLVED] opening order macro for files in a folder
    By Sanbitter Man in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2006, 06:15 AM

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