?
Solved

EXCEL.exe access violation

Posted on 2001-07-17
13
Medium Priority
?
6,761 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 8

Expert Comment

by:tskelly082598
ID: 6290642
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
ID: 6291115

 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
ID: 6295171
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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 13

Expert Comment

by:cri
ID: 6295301
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
ID: 6295560

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
ID: 6295578
Do you have SR2 also loaded at home?
0
 
LVL 13

Accepted Solution

by:
cri earned 900 total points
ID: 6295762
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
ID: 6295784
If the last link does not work right away, hit Refresh.
0
 

Author Comment

by:hughesp
ID: 6298725

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
ID: 6308994
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
ID: 6309568
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
ID: 6309752
Thank you.
0
 

Author Comment

by:hughesp
ID: 6310541
tskelly -

Running 2000 (9.0.2720) on ME
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

762 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