LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unhandled Exception in Mso9.dll when Using XlCoerce with Excel 200

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!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhandled exception - Not implemented Aggie Excel Worksheet Functions 0 May 31st 07 06:23 PM
Problem Opening an Excel File MSO9.DLL Error Mash23 Links and Linking in Excel 1 October 5th 05 06:20 AM
Problem Opening an Excel File MSO9.DLL Error Mash23 Links and Linking in Excel 0 August 24th 05 03:21 PM
Unhandled Exception Error J Excel Programming 1 May 3rd 04 01:06 AM
xlCoerce on multi-part xRef squillion Excel Programming 0 September 10th 03 04:58 PM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"