Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
SYMPTOMS
When I use XlCoerce in a dynamic-link library (DLL) that is loaded by Microsoft Excel 2000, the following error message appears Unhandled exception in EXCEL.EXE (MSO9.DLL): 0xC0000005: Access Violation. CAUSE I am developing an XLL in Microsoft C++ 6.0 for Excel 2000. In my design Excel calls my XLL function. Excel crashes when I try to use Excel4( xlCoerce, in my XLL function to coerce a reference XLOPER (xltypeRef) that refers to a two dimensional range that contains text and empty cells. Excel crashes in two different ways: 1) right in xlCoerce function if the function is called after I select the Excel cell with XLL function click F2 and ENTER, 2) when I return control from the XLL function back to Excel if XLL function was called as the result of manually changed Excel cell that is input for the XLL function. I looked on Internet to see if anyone had the same problem but I did not find anything. The closest I could find was: 1. Microsoft article "Unhandled Exception in Mso97.dll" When Using XlCoerce with Excel 97: http://support.microsoft.com/kb/q166287/ But this article says that it applies to Excel 97 and was fixed in Excel 97 SR-1 but I am using Excel 2000 SP-3. 2. The second Microsoft article is FIX: Excel 2000 May Fault in MSO9.DLL When Calling an XLL Function that Takes an Array because I do pass xltypeMulti|xltypeNum array: http://support.microsoft.com/default...b;en-us;304442 But again it is not exactly what I have. The article says that the crash appears in the following condition: When Excel prepares to call an XLL function during a recalculation, Excel calculates all dependent cells that are needed to produce the arguments to pass to the XLL function. If one of the dependent cell values is changed by outside code (such as DDE or Automation) after this calculation, but before the XLL function is called, Excel must postpone the XLL call and again recalculate the dependent cells. I do not have a calculation of dependent cells in my spreadsheet as described above. All I have is one XLL function in the spreadsheet that takes 13 parameters and all input parameters are plain number, text or empty cells in forms of individual cells and ranges. Did anyone have the similar problem? What did you do? Do you have any ideas on how to solve this? If there is no fix then I have to write a function that will loop through the xltypeRef and retrieve each cell value in a range individually I hope it will work! Thank you very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unhandled exception - Not implemented | Excel Worksheet Functions | |||
Problem Opening an Excel File MSO9.DLL Error | Links and Linking in Excel | |||
Problem Opening an Excel File MSO9.DLL Error | Links and Linking in Excel | |||
Unhandled Exception Error | Excel Programming | |||
xlCoerce on multi-part xRef | Excel Programming |