PDA

View Full Version : [SOLVED:] Excel.exe has generated errors?????



infinity
07-18-2005, 08:03 PM
HELLLLLP!!!!! I have a very elaborate program that I have been working on for almost a year. I was working on one of the many aspects of it today. The page that I was working on today, I closed it down and later reopened that page and I got an error message that read "EXCEL.EXE has generated errors and will be closed by Windows. An error log is being created." I had this happen to me early on in the development stages and had to redo those pages that that happened on. This thing has gotten so elaborate that would be unthinkable at this stage in the game. CAN ANYONE HELP ME??????? Thank you in advance:banghead: VERY FRUSTERATED, Scott

Justinlabenne
07-19-2005, 06:27 AM
I could not find the link to this, so I have attached a recovery template created by Ole Erlandson, It may help, and also provides some links and tips to help too.

Before using it, SAVE A BACKUP COPY

If it doesnt work, you don't want to lose everything, so have a backup, and think about a re-design for the future, maybe even attach it if the file size it not to big to a post here, I don't have a problem with opening it, but it may not be relevant.

infinity
07-19-2005, 09:48 AM
Justin,

Thank you for your reply. I have to apologize in advance, I know on VBax I am dealing with many professional coders. I am not one of them. If you could tell me, how do I use this zip file and what can I expect. I do have many hours invested in this and do not want to do anything to jeopardize it. I have saved a copy to CD but the workbook that has the error has some programming that is not on disc before the error was created. You also said I may want to consider a redesign in the future, what are you referring to? Do you mean redesign the entire program? Thank you so much for your help

Scott

Bob Phillips
07-19-2005, 10:09 AM
You also said I may want to consider a redesign in the future, what are you referring to? Do you mean redesign the entire program? Thank you so much for your help

As an example, separate the data from the code, into separate workbooks.

Other than that, we would need to undesrtand the app requirements.

infinity
07-19-2005, 11:09 AM
Hey Bond,

You said to separate the code from the data into separate workbooks? By doing that are you referring to making the code separate from the actual workbook the code is used in? I have to say that would be ideal, and I am sure neccesary, because I can only assume that the code would not be able to be altered by a user other than myself. Is that correct? I also have to say that my experience with VBA is limited only to what I have done with this program and that is an extreme disadvantage for me. This program began as something that I was going to use only for myself to make my job easier, and over the last year it has turned into something that I would like to be able to market at some point in the future, though I have several issues to resolve before that will be feasible. That issue just happens to be one of them. One other thing I will have to do is have a professional coder review it before I can market it and help me resolve issues that I do not have the insight to be able to catch. Thank you

Scott

Bob Phillips
07-19-2005, 11:55 AM
Hey Bond,

Just call me Ionic.


You said to separate the code from the data into separate workbooks? By doing that are you referring to making the code separate from the actual workbook the code is used in? I have to say that would be ideal, and I am sure neccesary, because I can only assume that the code would not be able to be altered by a user other than myself. Is that correct?

Yes, that is what I mean. Unfortunately it doesn't make it any safer, as Excel security is weak. But it does have the advantage that if you chnage the code for any reason, distributing those changes is greatly simplified. Normal (whatever that means) practice is to store the code in an add-in, which is loaded when Excel starts, then you would just load the data workbook. To make it really nice, you can add menu options, including one to open the data workbook.


I also have to say that my experience with VBA is limited only to what I have done with this program and that is an extreme disadvantage for me. This program began as something that I was going to use only for myself to make my job easier, and over the last year it has turned into something that I would like to be able to market at some point in the future, though I have several issues to resolve before that will be feasible. That issue just happens to be one of them.

This definitely sounds like a candidate for splitting as I outlined. I would strongly advise against marketing anything where the application and the data co-reside. An add-in, or a COM add-in, or a VB DLL should definitely be your objective. Your lack of VBA is obviously a disadvantage, but there are plenty of people here and elsewhere who could help you, especially for a cut. :devil:


One other thing I will have to do is have a professional coder review it before I can market it and help me resolve issues that I do not have the insight to be able to catch.

Again, whilst I doubt many of us are professional code reviewers (does such a beast exist?), there are enough developers here who could help you with that.

infinity
07-19-2005, 12:32 PM
Ionic,

Absolutely I would expect to give the coder a cut. I do not have a problem with that because that would only be fair. However, unfortunately I do not even know where to begin looking for someone that can be trusted. I am actually getting ready to move to Colorado and will be actively seeking someone to help me with that.

When you said to load the code into an add in, I have to say, I have run across that option, but for the fear of absorbtion overload, I have to, my detriment, avoided add ins all together. I would however like to learn how to use them. If I have code that refers directly to specific workbooks to use in the process of running the code, how can an add in help with distribution? I have to do that quite often, as a lot of the actions I have to perform are identical from one workbook to another with the exception of the additional workbooks that they refer to. The extremely little that I know about add ins, even I can see advantages to it, I am sure there are many advantages that I cannot be aware of because of my limited knowledge, but I am learning more everyday.

I do still have this problem with the error in the one workbook that closes Excel all together. I am hoping that Justin will be able to elaborate on what to expect and how to use the zip file he gave me. The last thing that I was doing was working with ActiveX control buttons before the error was generated.

Scott

Bob Phillips
07-19-2005, 01:20 PM
When you said to load the code into an add in, I have to say, I have run across that option, but for the fear of absorbtion overload, I have to, my detriment, avoided add ins all together. I would however like to learn how to use them. If I have code that refers directly to specific workbooks to use in the process of running the code, how can an add in help with distribution? I have to do that quite often, as a lot of the actions I have to perform are identical from one workbook to another with the exception of the additional workbooks that they refer to. The extremely little that I know about add ins, even I can see advantages to it, I am sure there are many advantages that I cannot be aware of because of my limited knowledge, but I am learning more everyday.

Add-ins are easy. The most difficult concept to grasp, you are rarely, if ever, addressing the active or default workbook, so it is vital to make sure that you have a good handle to the workbooks, and address the objects within that workbook through that handle. Best way is to set an object variable when you open it


Set wbData = Workbooks.Open Filename:= "myBook.xls"

and then use that handle


wbData.Worksheets(1).Range("A1")

where in a data/code amalgamated book you could simply use


Range("A1")

Probably best to get the user to nominate the file to open, using the GetOpenFilename method.



I do still have this problem with the error in the one workbook that closes Excel all together. I am hoping that Justin will be able to elaborate on what to expect and how to use the zip file he gave me. The last thing that I was doing was working with ActiveX control buttons before the error was generated.

What you need to do is:
- take a copy of your workbook
- unzip the file - there is a Word dot file in there
- click the button and follow the instructions.

Haven't tried it (I don't have a corrupt book), but it seems straight-forward enough.

.

infinity
07-19-2005, 01:32 PM
Ionic

When you say I should take a copy of my workbook, do you mean I should use the workbook that is on my hard drive, or should I unzip it with the workbook open from the disc? I have saved the file to disc with the error it is generating on the disc. I would think I would have to do it with the workbook that is on my hard drive. Thanx Scott

Bob Phillips
07-19-2005, 01:38 PM
When you say I should take a copy of my workbook, do you mean I should use the workbook that is on my hard drive, or should I unzip it with the workbook open from the disc? I have saved the file to disc with the error it is generating on the disc. I would think I would have to do it with the workbook that is on my hard drive.

I am just saying take a copy as Ole's tool could mess it up, so you need a fallback.

infinity
07-20-2005, 07:20 PM
Thank you Ionic and Justin for all your help. Although the Zip file did not work in my case you were both very helpful. I had to redo the work that I had performed in that workbook since my last save to disc. Thank God it was not all that much. Thanx again.

Scott

brettdj
07-20-2005, 10:08 PM
When dealing with corrupted files with Office 2000 that gave the dreaded "Excel.exe error" I recovered around 90% of them with Open Office, http://www.openoffice.org/dev_docs/source/download.html (http://www.openoffice.org/dev_docs/source/download.html) and was then able to use Excel to access them. Excel 2003 seems a lot more robust.

Cheers

Dave

infinity
07-20-2005, 10:19 PM
Dave,

Thank you for your response. I think I may have figured out what I did wrong to generate the error. I had this happen to me a couple of times in the development process of this program early on and remembered I had done the same thing in those instances. I will make sure I do not do that again. What I am trying to do and so far have not figured out a way of doing it is this, I have discovered how to select an ActiveX control button in a macro but I am trying to figure out how to disable it. On another thread I have going, someone gave me this CommandButton1.Enabled=False, but when I run it I get another error that reads "Object doesn't support this property or method" I know I am close but am new to VBA and could use the help if you can. Thanx.

Scott