+ Reply to Thread
Results 1 to 8 of 8

Error when saving a workbook

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Error when saving a workbook

    Hello all!

    I have tried to save a workbook several times in the last 2 days and it keeps giving me an error message but I don't understand why. I have an original workbook, which will allow me to make changes and save just fine. I can also run the needed macro on it with no problem.

    I made a copy of the original data sheet from that book in a new workbook, so I could play with a smaller data sample. (I've been trying to understand exactly how the macro works, step by step). I started this on Tuesday and everything was okay until the end of the day. When I went to save that smaller sheet to look at some more today, it would NOT save! The error it gave me, several times, was:
    "Errors were detected while saving ':\Macro practice.......\Book2.xlsx. Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel."
    I tried clicking Continue and then it told me that the errors were SO awful that they couldn't be fixed! Next time, I clicked Cancel and, of course, it prompted me to save the book before closing it. I went aroundn those 2 circles a few times, then just dumped the book and went home for the day.

    So, today, I started all over - making a copy of the original data sheet in a new book, paring it down to a minimal number of rows, and successfully saved it before I started working with it; YAY! I made 2 extra copies of the now-shortened raw data and tried to save it and got the same error message from Tuesday.

    I even tried creating a new, blank workbook and then copying and pasting just the raw data - no formatting or anything - on Sheet1 and that WILL save! But why would it let me save twice with the original formatting in the other book and then not let me save the third time? And why would the original, original book have been saveable for probably 6-7 years now, even today?

    Any idea what's up with this?

    (To be honest, the macro isn't working perfectly like it used to, although the data I'm looking at now is a copy of the data in use when the macro was created)

    Thanks for any insights!

    Jenny

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Error when saving a workbook

    Have you tried to "repair" excel?
    https://support.office.com/en-us/art...e-a6b40c5bb88b
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Error when saving a workbook

    Its hard to say without a sample and knowing the exact steps you took from copying until it stopped working.

    Generally the error you mention is due to corruption in the workbook. Its possible the manipulations you are making or that the macro are causing these issues (or a combination of the 2). Its also possible there is an underlying issue in the original file that only surface through the additional steps you take after copying it.

    Sometimes there is simply nothing that can be done with a specific file to prevent this. I often explain files on a computer like moving boxes; you can pack stuff in them and move many times. Some boxes will last "forever" and others might fall apart after 1 or 2 moves. Most of the time a box will start to fray and rip and show signs of wear before becoming completely broken, but on occasion it will just fall apart as you try to move the contents. Computer files can behave in much the same way, allowing you to store and manipulate the contents. Sometimes the file itself becomes corrupt and the symptoms give us a chance to move the contents to a new file before the file is no longer functional. This is especially true with "older" files that have been in use for years.

    Specifically in Excel, the file corruption can sometimes be adverted by moving the contents in a very particular way to a new file. Done in such a way as to not carry over the underlying cause of the corruption this can resolve the problem with some effort. However, sometimes its possible to carry the source of the corruption over with the file which doesn't benefit you very much. I am a fan of this method of resolving corruption in older files as it also gives a good chance to review the file and decide whats still relevant, whats not and consider alternative approaches to how the data and representations are handled.

    Oddly enough you make mention of macros but then say the error references a "Book2.xlsx" which is not macro enabled (xlsx cannot store macros, instead xlsm is typically used). Was this just a oversight on your part when posting the error here or are you actually trying to save a macro enabled copy of the file as xlsx?

    Like I said, without seeing a sample and knowing the exact steps you are taking its hard to give specific help, the above are just general inputs.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  4. #4
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Error when saving a workbook

    Quote Originally Posted by FDibbins View Post
    I hadn't heard of that before. I went to the link and poked around a bit; my buttons/icons don't look exactly like the ones on the link, but I was able to locate the destination it wanted me to go to. Sadly, I'm a big, fat coward and am much to chicken to do anything like that without someone looking over my shoulder and our IT guy isn't here today. When he comes back - probably Monday - I'll make him come and babysit me.

    Every other workbook I go to is operating just fine, though. If excel itself is "broken" shouldn't it be affecting more than just the one workbook? Especially when that one book is simply a copy of another workbook that seems to be fine? (I know JUST enough about computers to get myself in trouble, but not enough to fix anything, LOL!)

    Thanks

    Jenny

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Error when saving a workbook

    Potentially, your it could just be that specific file and not the program, but it wont hurt to start there.

  6. #6
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Error when saving a workbook

    Quote Originally Posted by Zer0Cool View Post
    Its hard to say without a sample and knowing the exact steps you took from copying until it stopped working.

    Generally the error you mention is due to corruption in the workbook. Its possible the manipulations you are making or that the macro are causing these issues (or a combination of the 2). Its also possible there is an underlying issue in the original file that only surface through the additional steps you take after copying it.

    Sometimes there is simply nothing that can be done with a specific file to prevent this. I often explain files on a computer like moving boxes; you can pack stuff in them and move many times. Some boxes will last "forever" and others might fall apart after 1 or 2 moves. Most of the time a box will start to fray and rip and show signs of wear before becoming completely broken, but on occasion it will just fall apart as you try to move the contents. Computer files can behave in much the same way, allowing you to store and manipulate the contents. Sometimes the file itself becomes corrupt and the symptoms give us a chance to move the contents to a new file before the file is no longer functional. This is especially true with "older" files that have been in use for years.
    Oooh, analogies! I LOVE analogies; they make more sense to me than almost anything else in the world. Your explanation makes total sense to me; I really never thought of that before.

    Specifically in Excel, the file corruption can sometimes be adverted by moving the contents in a very particular way to a new file. Done in such a way as to not carry over the underlying cause of the corruption this can resolve the problem with some effort. However, sometimes its possible to carry the source of the corruption over with the file which doesn't benefit you very much. I am a fan of this method of resolving corruption in older files as it also gives a good chance to review the file and decide whats still relevant, whats not and consider alternative approaches to how the data and representations are handled.
    I found out about 30 minutes ago that, if I start with a whole, new workbook and just copy the contents of the original sheet, then paste/special/values onto Sheet1 of the new book (with NO formatting) things SEEM to be going along alright, at least for now.

    Oddly enough you make mention of macros but then say the error references a "Book2.xlsx" which is not macro enabled (xlsx cannot store macros, instead xlsm is typically used). Was this just a oversight on your part when posting the error here or are you actually trying to save a macro enabled copy of the file as xlsx?
    All of my macros are stored in my Personal Macro Workbook and I just run them from there. Don't tell me I've been doing something stupidly wrong all this time! Mostly, I've done it this way because a LOT of the macros get run on workbooks that are newly created each time and it just seemed simpler to just save the workbook as xlsx and go from there. Especially since many of the macros have been made for co-workers and you can imagine trying to get ALL of the people to remember to save as xlsm! They're used to just saving the way they've always done and would be hard to change.

    Thanks

    Jenny

  7. #7
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Error when saving a workbook

    Quote Originally Posted by FDibbins View Post
    Potentially, your it could just be that specific file and not the program, but it wont hurt to start there.
    Okay, thank you! I'll grab the IT guy on Monday. I am WAYYYY to chicken to do, well..... anything to my work computer without Tom, LOL!

  8. #8
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Error when saving a workbook

    Having macros in the personal workbook is fine, I presumed incorrectly that the macros where in the file you mention.

    While repairing Office can help when the program as a whole is problematic I find it unlikely to help when a specific file is an issue (and I presume other files work as expected). Usually a problematic file comes down to 1 of 2 things: It is degrading/becoming corrupt (either on its own or due to how something was done) or due to the content in the file and how it was created or manipulated.

    Based on you being able to copy content out and the problem not resurfacing I am leaning towards the first, however if its an issue with content its possible you just havent copied it over yet. I still think thats the best approach, carefully copy content (using the most limited forms of selection and copy/paste) and manually recreate stuff that can easily be done (like inserting a logo image, typing in a header, etc).

    As another kind of experiment, create a copy of the file the way you had when you had the problem and save the file as either an xlsb or xls, then back to xlsx again. Wait for the copy to have the issue before saving temporarily in another format. This can sometime fix underlying issues in the file as Excel needs to convert the file to a new format then back often correcting underlying issues in the structure.

+ 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] Getting a saving error when closing workbook. Keeps asking to save again and again
    By Nitro2481 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-01-2016, 09:23 AM
  2. [SOLVED] VBA: saving workbook with password error
    By Broobi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2015, 10:25 AM
  3. Creating a new workbook, copying sheets & saving workbook - Subscript error
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2014, 09:04 AM
  4. Error 9 when saving workbook
    By 06nenglish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2013, 10:47 AM
  5. VBA Run Time Error when saving workbook between Users....?
    By slu2383 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-28-2012, 04:22 PM
  6. Error Saving Protected Workbook
    By sdforson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2010, 10:44 AM
  7. [SOLVED] error message when saving excel workbook
    By Deb in forum Excel General
    Replies: 1
    Last Post: 10-05-2005, 04:05 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