Hello: I am experiencing an Excel crash under odd conditions. This is the kind of crash in 2010 that manifests with a dialog box which says "Excel has stopped working" Then it gives me the options to search for a solution and restart or just shutdown the program. It also gives more information on the crash that may be of more use to you than by me. The specific conditions are:
Workbook with OLEObject that causes the crash was created in Excel 2010. The Stand Form button clicked executes code that clears data AND deletes another button, BUT this button is an OLEObject CommandButton. The code line that crashes is
Now here is the really weird part. If the this workbook is opened by itself, it works fine. However, I want to merge this into another workbook that was created in Excel 2003, but I have saved into Excel 2010. There are Standard Form buttons used in the second workbook but no OLEObjects that I am aware of. There is TONS of VB code behind this second workbook. Now, even though there is no apparent connection between the two workbooks at this point (not yet merged) When I click the button that executes the above line of code, I get the crash. If I open other workbooks that the code works fine. So, I know you will say, well there obviously is some connection between the two, but I have labored to make sure subroutines and functions are not duplicated and there does not appear to be a connection. They are and were independently created. The details provided by Excel are below and I am hoping you will be able to use that to at least suggest where to look. I found a similar post in here concerning OLEObjects and one of the experts said that the technical developers would need to look at it and it might be a bug in Excel. Thanks. This is particularly vexing since there doesn't appear to be a connection...
Problem Event Name: APPCRASH
Application Name: EXCEL.EXE
Application Version: 14.0.6117.5003
Application Timestamp: 4f622ef8
Fault Module Name: VBE7.DLL
Fault Module Version: 184.108.40.206
Fault Module Timestamp: 4f86f5aa
Exception Code: c0000005
Exception Offset: 0000896a
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
skulcid: 1033Additional information about the problem:
I may be able to but I need to verify with my company first. What is Skydrive and how do I use it? In the meantime perhaps you can answer this. If I have a workbook open with VBA code created in Excel 2003 (e.g. no OLEObjects available then) and a workbook open created in Excel 2010 with OLEObjects used and manipulated via VBA code, if I execute that 2010 workbook, are ALL workbooks executed by Excel simultaneously? If so, would the presence of OLEObject code executing while code was also executing that was not created when OLEObjects were available cause a conflict? That essentially is what is happening. I have opened another old workbook with VBA code created in 2003 with no OLEObjects, opened it and this new workbook just like I described earlier with another larger old workbook, and I got a crash again. So the problem is not between this new workbook and ONE specific workbook, but with any older workbook with VBA code, and access to OLEObjects in the older code, while this newer workbook also is executing with OLEOBject code.
You already have an account with skydrive where you can upload files, with the sharing options you can get a link(s) for others to download the file(s). Remove any sensitive data.
I'm still not following. If(?) you are saying the 2003 workbook is open in 2010 together with a 2010 workbook open in the same instance of Excel (presumably also 2010?) all code will be controlled by the same instance. I don't know what you mean by "execute" a workbook, run its code?
Are you saying whenever you have a workbook created in 2003 (an xls?) open in 2010 with a workbook created in 2010 that has OLE objects the 2010 instance crashes? If so what action or line of code on which workbook triggers the crash?
FWIW, adding OLEObjects to the workbook that is running the code (ie to self) can trigger a crash though that doesn't seem related to anything you are doing.
I was able to eliminate this problem by finding the correct methods and properties of the button form to substitute it for the activex command button. To recapitulate, I had a workbook open excel 2010 that was an (.xlsm) workbook and was created with excel 2010 and contained the activex commandbutton control and code to use it. I also had open in excel 2010 another workbook that was ORIGINALLY created as an (.xls) workbook in excel 2003, did not contain any activex controls. Executing the code that manipulated the activex control in the first mentioned workbook crashed excel. I also saved the second mentioned workbook as an xlsm version, repeated the experiment and excel still crashed But as I say using button form in ace of commandbutton eliminated the problem.