Solved

EXCEL.exe access violation

Posted on 2001-07-17
13
6,298 Views
Last Modified: 2012-05-04
I am writing a worksheet (with several forms and some macros and some user defined functions within it) and I have been experiencing an intermittent problem when I save and close the worksheet it and attempt to reopen I get the message

Dr Watson for Windows NT

An Application error has occurred and an application error log is being generated

EXCEL.exe
Exception: access violation (0xc0000005), Address 0x301177bc  

I cannot get back in to the worksheet

I have the Dr Watson Crash Dump File but I cannot make neither head nor tail from it  

I have to completely shut down excel go back to an older saved version of my spreadsheet and rewrite all my my work. It does not happen all the time

Anybody know what I am doing wrong ???

I am running Excel 97 SR2 on NT
0
Comment
Question by:hughesp
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 8

Expert Comment

by:tskelly082598
Comment Utility
I searched the internet and found a reference to how the sheet is named in a macro. I don't know if this is relevant or not to your situation. Quote from reference below: "The macro refers to the worksheet directly by its object name as opposed to referring to it as part of a collection (for example, using the syntax Sheet1.Delete rather than Sheets(1).Delete)."



http://mspress.microsoft.com/books/ww/sampchap/3846c.htm

0
 

Author Comment

by:hughesp
Comment Utility

 I took a look at the link you posted - I cannot find a reference to the Address 0x301177bc (or any where else on the net for that matter). The collection of conditions refered to in the text (deleteing worksheets etc ) do not occour in my worksheet so I do not think that is the problem

Paul
0
 

Expert Comment

by:robertsmith28
Comment Utility
Just a guess as I had a similar (but not identical) thing, are you saving the workbook as 'Microsoft Excel Workbook' as ooposed to 'Microsoft Excel 97/5.0 & 95 Workbook'. Saving as the former solved my littlew thing.
0
 
LVL 13

Expert Comment

by:cri
Comment Utility
Here a couple of maybe's

a) Do you save to a network drive ? Server operating system ? According Microsoft Excel's save method is the most demanding, wrong network settings can corrupt your workbook. If this is a possibility, work locally for a given time and make sure you backup by 'file manager copy' regularly.

b) Is the workbook very complex and/or do the dependencies (arrows) 'criss-cross' ? If yes: Do you use Volatile functions and/or DLL's ?

c) If Excel shows this kind of quirks with other workbooks and the network can be ruled out:
Re-register Excel with
- Close Excel
- StartButton|Run: excel /regserver (there is a blank before the switch)
This will rewrite all Excel registry keys

d) Did you yet 'move' the content to a new workbook (by clipboard where ever possible) ? If not, it might be worth a try as the workbook might be corrupted. However, take utmost care if you have named cells/ranges.

More after the break, meaning input from you.
0
 

Author Comment

by:hughesp
Comment Utility

Something else I thought of that may help define the issue. I am working on this workbook at work (where I run 97 and NT) but I also have taken it home to work on it there (running 2000 and ME). The problem has occurred in both places (I save both locallly and to the Network at work but am standalone at home and therefore save only local)  so it cannot be an issue of saving to the server.

I always save the workbook as the default and do not select  97/5.0 & 95 so I donot think that is the issue either

The workbook contains several function with subroutines that are fairly complex (for my  limited programming experience) that I developed a couple of years back. Some other users have added to/altered the format/code of the functions over time - primarilty to allow the code to be used in some test hardware. As such these altered  functions do pass info around in a criss cross fashion (that I wasn't too thrilled about). But I did not experience the problem until I was asked to add some user interface stuff (forms and graphs)      

I have not had this quirk with any other workbooks (only derivavtives of the original) so the problem maybe a corrupted workbook - as cri suggests. I will attempt cri's suggestion of copying the code to another work book. It may take some time to find if this is the source of the problem as, as i mentioned before the problem does not occur all the time and the only way to find out if it has solved it to write additional code etc and not get the crash (which is now only intermittent anyway)
0
 
LVL 8

Expert Comment

by:tskelly082598
Comment Utility
Do you have SR2 also loaded at home?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Accepted Solution

by:
cri earned 300 total points
Comment Utility
hughesp, besides that you can not exclude the network as being the source of your troubles unless a workbook was corrupted at home, I was not precise enough. An ill aligned floppy drive head or a conflict with Windows is all it takes:
http://support.microsoft.com/support/kb/articles/Q142/1/16.asp
http://support.microsoft.com/support/kb/articles/Q213/9/51.ASP

As recovering a workbook with Microsoft's tool see
http://support.microsoft.com/support/kb/articles/Q142/1/17.asp
As referenced there, there is also an utility named Recover.xla although I never used it.

If you keep revising your VBA code it will bloat. Download the CodeCleaner utility at http://www.bmsltd.co.uk/MVP/MVPPage.asp I use it at least twice a day, never had any problems (BUT: I do not use forms as a self set rule, so test it first with a testcopy)
0
 
LVL 13

Expert Comment

by:cri
Comment Utility
If the last link does not work right away, hit Refresh.
0
 

Author Comment

by:hughesp
Comment Utility

cri-
I downloaded the code cleaner. Whoa..liposucked my workbook from 1400K to 750K !! I was pretty bloated but never knew. Methinks all the junk in there could not be a good thing. I don't know if it will cure my crashing ills but its definitely a good thing. I am going to take an old version of my workbook (pre cleaned pre copied to new work book as per your above suggestion) and a new version (copied to new work book and then cleaned) and keep adding code/forms etc to both the the exact same way and see if I can generate the problem in one (hopefully the old). If and when the crash occours (in the old) I will assume that the changes you have recommened have cured the problem. Not the best method to attempt to come to a conclusion, but I cannot think of another way.

I looked at the atricle to recover a workbook. The best I can do is recover the contents of the cells (95% of the meat is in the background) so its not a lot of help

Will let you know as soon as I can get a crash

tskelly -
Don't know on the SR2 thing - will look tonight    




 
0
 

Author Comment

by:hughesp
Comment Utility
I created the two workbooks as per my earlier comment (and based on cris suggestions) and just kept on adding code from VBA projects I have worked on to both  (hopefully the exact same way each time ) I saved both at the same points and I cleaned the new workbook with the code cleaner prior to the save. After every save I quit both workbooks and then reopened. It took a while but after dumping a lot of code  but I did get the old workbook to crash while the new workbook continued to function.

I will conclude that the problem is fixed and the issue was either inefficeint code (cured by the cleaner) or a corrupted work book (cured by copying the code to a fresh workbook). I have given cri the points and a B grade (the only readson for the B is that at the moment I cannot concluded 100% that the root cause has been fixed)

Thanks for the help      
0
 
LVL 8

Expert Comment

by:tskelly082598
Comment Utility
I thought I had read somewhere that SR2 fixed a similar issue. Were you running SR2 at home or not?
0
 
LVL 13

Expert Comment

by:cri
Comment Utility
Thank you.
0
 

Author Comment

by:hughesp
Comment Utility
tskelly -

Running 2000 (9.0.2720) on ME
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Outlook Free & Paid Tools
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now