View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Greg Lovern Greg Lovern is offline
external usenet poster
 
Posts: 224
Default Excel 2002 and 2000 crash with Combobox on worksheet

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