+ Reply to Thread
Results 1 to 3 of 3

Merge All Sheets From All Selected Folders Into One Folder

  1. #1
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Merge All Sheets From All Selected Folders Into One Folder

    Hello,
    I have a good VBA that also works except for one small thing.
    The script merges all excel files in a folder to a workbook. This works well as long as the file names are not too long.
    With very long filenames the script aborts.

    I know that the file names, which then become sheet names, cannot be indefinitely long. But it would be good if the script could then use the maximum possible length for sheet names without aborting.

    Here is the VBA

    Please Login or Register  to view this content.
    I am very glad about your help.
    Many greetings
    Tom
    Last edited by CoSinus; 11-19-2021 at 04:17 AM.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Merge All Sheets From All Selected Folders Into One Folder

    Quote Originally Posted by CoSinus View Post
    ... if the script could then use the maximum possible length for sheet names without aborting.
    For examle:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Merge All Sheets From All Selected Folders Into One Folder

    Thank you very much.

    This line
    Please Login or Register  to view this content.
    Causes a stop.

    I have a workbook called 'Production Facility Locations and Operating Conditions.xlsx'. I think that is where it stops.
    The Skript should write the maximum amount of letters in the seehtname and cut off the rest.

    Thanks again for further help.
    Last edited by CoSinus; 11-20-2021 at 08:44 AM.

+ 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. Macro to list all files and folders in sub folders and choose a starting folder
    By LeanAccountant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2021, 02:04 PM
  2. copy checkbox selected listed files from base folder to user selected folder
    By ayush842001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2020, 08:23 AM
  3. Merge Excel sheets in a folder.
    By mohit999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2017, 04:44 AM
  4. [SOLVED] Count only the current folders in a folder, skip hidden & system folders
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-03-2015, 04:58 AM
  5. merge all worksheets from all XL files in selected folder
    By karthikthandapani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2014, 04:29 PM
  6. [SOLVED] Combine/merge selected sheets
    By arrongraham in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-03-2013, 11:05 AM
  7. Merge workbooks in a folder and rename sheets to previous filenames
    By zej in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2013, 10:19 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