+ Reply to Thread
Results 1 to 5 of 5

How to display the names of all the workbooks within a folder

  1. #1
    Registered User
    Join Date
    10-12-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    3

    Exclamation How to display the names of all the workbooks within a folder

    I have written a code to merge sheets in a workbook. But now I want it to run through all the .xlsx files with a specified folder.
    But the below-mentioned code doesn't seem to be working.

    Please Login or Register  to view this content.

    Error - Subscript out of range error
    Please let me know if you have a solution to it or an alternative approach to run code through multiple files in a folder without opening.
    Thank You.
    Last edited by vibhutiverma; 10-14-2020 at 03:22 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: How to display the names of all the workbooks within a folder

    Workbooks(FileName).Activate
    You can't activate a closed workbook.

  3. #3
    Registered User
    Join Date
    10-12-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    3

    Re: How to display the names of all the workbooks within a folder

    Thanks.

    Could you let me know how to refer to that workbook?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: How to display the names of all the workbooks within a folder

    I do have a code and a youtube clip on how to use the code.

    Please Login or Register  to view this content.
    See my clip on how to use it.
    Loop Through a folder of workbooks

  5. #5
    Registered User
    Join Date
    10-12-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    3

    Re: How to display the names of all the workbooks within a folder

    Thank You. This works.

+ 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. [SOLVED] Copy Range from multiple Workbooks in folder, to Summary Workbook also in same folder?
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-24-2018, 01:22 PM
  2. Code to loop through workbooks in folder with specific names
    By stephme55 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-31-2016, 07:31 PM
  3. [SOLVED] Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub
    By Rschwar23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 10:06 AM
  4. Create FOLDER in subfoldesr and move folders with specific names into FOLDER
    By Amarjeet Singh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2015, 09:46 AM
  5. [SOLVED] Macro to list worksheet names of all closed workbooks in a specified folder
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-15-2014, 12:52 PM
  6. Replies: 4
    Last Post: 05-08-2014, 02:47 PM
  7. Display Folder Names in Cell
    By old_cadger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2011, 09:22 AM

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