+ Reply to Thread
Results 1 to 3 of 3

Unreadable content / removed sorting - macro help

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Unreadable content / removed sorting - macro help

    Hi all,

    I get an error when I try to open a .xlsm file after a macro ran in a previous editing session of that file. The error is that Excel found unreadable content and when I choose repair the following message is displayed: "Removed Records: Sorting from /xl/worksheets/sheet3.xml part". When I repair the file without running the macro and save and reopen the file, there is no error message.

    The macro that does a A-Z sorting on the 3rd sheet (named "Inventory") is copied below. I googled for a solution and the only thing I could find was to insert: ActiveWorkbook.Worksheets("Inventory").Sort.SortFields.Clear after the End With. I did that but this didn't solve the issue. Maybe I copied it in the wrong place or my code is just bad (I'm new at this...). Hope someone can help me! Thanks a lot!

    Please Login or Register  to view this content.
    Last edited by Excellation86; 03-29-2018 at 08:19 AM.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Unreadable content / removed sorting - macro help

    Hi,

    Perhaps this instead
    Please Login or Register  to view this content.
    Is the data on that sheet in a Table?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    02-01-2017
    Location
    London
    MS-Off Ver
    2010
    Posts
    5

    Re: Unreadable content / removed sorting - macro help

    Hi,
    Thanks for your help. I just figured out what was the problem. I think the error was triggered by trying to filter A-Z an already filtered A-Z column so I added the following line to the macro before the actual filtering was performed:
    ActiveWorkbook.Worksheets("Inventory").AutoFilter.Sort.SortFields.Clear . I guess this made the file ready to be filtered again. I'm not getting the error anymore. I hope it stays that way, if not, I'll try your solution.

    The data on the specific sheet was not present in a Table.

    Thanks!

+ 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. How can I fix a file with unreadable content?
    By mcmuney in forum Excel General
    Replies: 1
    Last Post: 10-09-2014, 09:40 PM
  2. Unreadable content. What do?
    By lordfa9 in forum Excel General
    Replies: 0
    Last Post: 03-26-2014, 10:36 PM
  3. Replies: 1
    Last Post: 04-19-2013, 11:23 AM
  4. Repair Unreadable Content: Removed Sorting
    By bemidjipatriot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2013, 05:07 AM
  5. VBA/Word picture content control causing unreadable content
    By atycks in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2013, 04:51 PM
  6. Unreadable Content error
    By dta1984 in forum Excel General
    Replies: 2
    Last Post: 07-16-2012, 01:46 PM
  7. [SOLVED] Macro creating "unreadable content"
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 01:06 PM

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