How to avoid corrupting a workbook

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

How to avoid corrupting a workbook

Post by ABabeNChrist »

Is there a routine or a good practice in preventing a file from becoming corrupted?
What I have been trying is I’ll make some changes then save, then after doing this a few times I would then save a copy; put it to the side while I continue on. In the whole skim of things I probably save and copy the workbook a couple dozen times. But every once in a while I would receive a message saying that I am unable to save this workbook and it will then automatically save a backup. I then would close everything out delete the back up and the working copy. And then restart using the copy. These can’t be normal. :scratch:

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to avoid corrupting a workbook

Post by HansV »

I don't have a ready-made recipe to prevent corruption.

I have workbooks that have been opened, edited and saved by many users several times per (work)day during a number of years. They contain formulas, conditional formatting, data validation and macros. Yet they have never become corrupted yet (knock on wood!) They are not shared - only one user can edit them at a time.
So non-shared Excel workbooks, even reasonably complex ones, are quite robust in my experience.
Still, I suppose that the larger and more complex a workbook becomes, the greater the chance of it becoming corrupted.

The mantra "backup, backup, backup" is probably your best safeguard.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15645
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to avoid corrupting a workbook

Post by ChrisGreaves »

ABabeNChrist wrote:Is there a routine or a good practice in preventing a file from becoming corrupted?
:pcvmac: ?
With both Excel and Word appliactions, I adopt the same procedures:
(1) If I am working in VBA and/or messing around with toolbars, I run a code cleaner every day or two (Excel code cleaner, Word code cleaner)
(2) at the document/workbook level I use a "savenewversion" macro to leave an audit trail of versions.
I figure that with the audit trail it is often faster to fall back one version and re-implement changes cleanly than to try and recover the wobbly current version.

The attached VBA module may work for you.
He who plants a seed, plants life.

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

Thank you both for your input, most greatly appreciated.
Its better to ask then not asked and later wish you did

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

Hi as I mentioned in the first part of this thread
ABabeNChrist wrote:But every once in a while I would receive a message saying that I am unable to save this workbook and it will then automatically save a backup. I then would close everything out delete the back up and the working copy. And then restart using the copy. These can’t be normal.
Here is a view of the first message that I recived
First error message.JPG
then this message
second error message.JPG
At this point I usually just close out workbook, then delete and restart with last copy. This event doesn’t occur all the time, but it makes me wonder is workbook corrupted at this point. I’ve tried to take all precautions I could think of. Also I thought of sending a sample workbook but due to its size, by the time I make it small enough, there nothing left. Any suggestions
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to avoid corrupting a workbook

Post by HansV »

When I search for the first error message in Google, I find the following recommendations:
  • Make sure that you have the latest service pack and updates for Office 2007.
  • Turn off your antivirus program temporarily to see if the problem goes away.
    Note: preferably avoid visiting the internet while the antivirus program is inactive, or at least be very careful.
  • Disable indexing for the folder that contains the workbook:
    - Right-click the folder in Windows Explorer.
    - Select Properties from the popup menu.
    - Click Advanced.
    - Clear the check box labeled "Index this folder for faster searching" or "For fast searching, allow Indexing Service to index this folder" or similar (it depends on the Windows version).
    - Click OK twice.
Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

Thank you Hans
I shall give this a try :crossfingers:
Many thanks

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to avoid corrupting a workbook

Post by HansV »

Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

Hi Hans
I first tried to disable indexing from the folder that contains the workbook. With no change I still got error.
Then I remember that I just installed Malwarebytes last week and that seemed to be the time that I started developing this problem. I then tried to disable, but was unable to find settings for this, unless I want to totally uninstall. So I thought since my workbook is a xlsb, and there is some limitability in comparison to xlsm, I then saved workbook as a xlsm, then I ran the workbook through the ringer, so to speak. I wasn’t able to get the error message, at least not at this point.
I also thought about the hot fix, but after reading about it, it seemed kind of scary, wasn’t sure I wanted to do that.
I cant Imagine it being a different file extension.

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to avoid corrupting a workbook

Post by HansV »

If you don't get an error while using the .xlsm format, I'd stick with that.
Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

I tried using xlsm and it seemed to work, at least I thought it was until of course I received that most familiar error sign, which seems to appear less often. So now I got a little bold and have gone to the hot patch. Once again it seems to be working.
Hot patches to me seem to be a little scary. It kind of reminds me of a new types of medication where as when you use this medication to get rid of a runny nose you may experience a variety of different side effects, like Baldness, Stiff joints, Constipation, Drowsiness, Sight impairment and lack of better judgment along with a whole bunch more.
But of course I’m a thrill seeker :bananas:

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to avoid corrupting a workbook

Post by HansV »

Ah... be bold and become bald... :grin:
Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

As you may have noticed from my photo, I’m not too afraid of going bald; it’s the lack of better judgment (addition to what I already have). :dizzy:

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

After a couple days of experimenting, trying all the mentioned items, I found the cause. A couple weeks ago I changed my antivirus program From AVG to Microsoft Security Essentials. I liked Microsoft Security Essentials, it seemed to work really good, I guess maybe a little too good. I then read a comment from Big Al about an antivirus program he recommended called “Avast”. So I uninstalled the old and replaced with the new antivirus program and no more error message.

That’s my story and I’m stick-in to it :bananas:

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15645
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to avoid corrupting a workbook

Post by ChrisGreaves »

ABabeNChrist wrote:After a couple days of experimenting, trying all the mentioned items, I found the cause.
I seek clarification.
The cause was a false-alarm from an AV suite?
That is, the workbook itself was not corrupt?
He who plants a seed, plants life.

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: How to avoid corrupting a workbook

Post by ABabeNChrist »

Hi Chris
Yes I believe that is correct. Once I switch antivirus programs, my problem seem to vanish. Even to this day, I haven’t had any occurrences. When I first tried the other possible remedies, they didn’t seem to work, I still kept getting the error message; it was only when I made the antivirus program change that the problem vanished. :clapping:

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15645
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: How to avoid corrupting a workbook

Post by ChrisGreaves »

ABabeNChrist wrote:Yes I believe that is correct.
Thanks for the follwo-up. What threw me was "I would receive a message saying that I am unable to save this workbook and it will then automatically save a backup."; that sure sounds like it was coming from Excel rather than from an AV program, and in this case, it probably was coming from Excel after its request-to-save had been blocked.
He who plants a seed, plants life.