Excel 2002 and 2000 crash with Combobox on worksheet

G

Greg Lovern

In a project which was originally speced to require Excel 2003 or
later, the beta customers have requested, and management has agreed,
to try to get it to work in Excel 2002 and 2000.

I'm doing a lot with a ActiveX Combobox on a worksheet -- moving it
around, making it visible or invisible, and swapping in different
lists, all depending on where the user clicks or navigates to with the
keyboard.

Works fine in Excel 2003 and 2007, but in 2002 and 2000 (Excel 97 not
tested), some actions on the Combobox make Excel crash ("Microsoft
Excel has encountered a problem and needs to close" etc).

I've tried to identify the problem line of code but Excel is making it
difficult -- the crash doesn't occur until all code completes, and
there are several different lines for which, if commented out, the
crash doesn't occur. But in each case, having that line without the
others works fine. Also, if the very same code is triggered by a mouse
action instead of a keyboard action, the crash does not occur.


Before I spend a lot more time trying to narrow it down, does anyone
have any suggestions about what the problem might be?


For the time being, I'm trapping the Delete, Tab, and Escape keys when
the Combobox is selected and suggesting alternatives in a msgbox. Not
ideal, but it works and doesn't crash.

Thanks for any suggestions.

Greg
 
A

Alan124

In a project which was originally speced to requireExcel2003 or
later, the beta customers have requested, and management has agreed,
to try to get it to work inExcel2002 and 2000.

I'm doing a lot with a ActiveX Combobox on a worksheet -- moving it
around, making it visible or invisible, and swapping in different
lists, all depending on where the user clicks or navigates to with the
keyboard.

Works fine inExcel2003 and 2007, but in 2002 and 2000 (Excel97 not
tested), some actions on the Combobox makeExcelcrash("MicrosoftExcelhas encountered a problem and needs to close" etc).

I've tried to identify the problem line of code butExcelis making it
difficult -- thecrashdoesn't occur until all code completes, and
there are several different lines for which, if commented out, thecrashdoesn't occur. But in each case, having that line without the
others works fine. Also, if the very same code is triggered by a mouse
action instead of a keyboard action, thecrashdoes not occur.

Before I spend a lot more time trying to narrow it down, does anyone
have any suggestions about what the problem might be?

For the time being, I'm trapping the Delete, Tab, and Escape keys when
the Combobox is selected and suggesting alternatives in a msgbox. Not
ideal, but it works and doesn'tcrash.

Thanks for any suggestions.

Greg

Hi,

Does this problem lead to your excel corrupt? If so, I think you can
try a popular Excel file recovery tool called Advanced Excel Repair to
repair your Excel file. It is a powerful tool to repair corrupt or
damaged Excel files.

Detailed information about Advanced Excel Repair can be found at
http://www.datanumen.com/aer/

And you can also download a free demo version at http://www.datanumen.com/aer/aer.exe

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top