+ Reply to Thread
Results 1 to 7 of 7

Sorting error when re-opening template

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Sorting error when re-opening template

    All the best wishes for the new year!

    But I have a macro error that is bugging me since last year
    Hope you guys can explain me what is going on.

    I have a small macro that opens a template, opens new data book, copies the new data into the template and closes both again.

    This runs fine for 1 go. Then the next it cannot open the template anymore giving me an error like "Removed Records: Sorting from /xl/worksheets/sheet1.xml".

    There is some sorting in the macro but what is going on.
    Will paste the macro here it is not very big:

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sorting error when re-opening template

    Would also be helpfull if somebody would have used a different approach for the sorting.
    Maybe a different sort of sorting would not have these problems

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,120

    Re: Sorting error when re-opening template

    Add this line just before the sort
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sorting error when re-opening template

    Thanks Fluff13, but I noticed now it does not pick up when a week already exists!

    They way I build that in apparently gets affected by putting in that line to lose the sorting.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,120

    Re: Sorting error when re-opening template

    I have no idea what you mean. If you do not delete previous sorts then you will get the problems you originally mentioned.

  6. #6
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sorting error when re-opening template

    Nevermind @Fluff13, I did better testing today and your solution works like a charm.
    Thanks!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,120

    Re: Sorting error when re-opening template

    Glad it's working & thanks for the feedback.

+ 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] Error:Invalid File format,while opening an Excel Template file
    By Saurabh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2022, 06:50 AM
  2. [SOLVED] VBA - Sorting Table - Error When Opening Back Up
    By REECE01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2020, 05:41 AM
  3. Code needs fixing because an Error message regarding sorting comes up on opening wb
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2012, 06:20 AM
  4. Replies: 0
    Last Post: 02-28-2012, 11:40 AM
  5. Opening Word Template(.dot) with Excel VBA - RUNTIME ERROR
    By wildjester in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-04-2011, 04:17 PM
  6. Template opening
    By Galliano in forum Excel General
    Replies: 3
    Last Post: 04-07-2006, 12:10 PM
  7. [SOLVED] Opening a template.xls using VBA code.
    By a in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-18-2005, 10:45 PM

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