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: 113
Default Code that Crashes Excel without fail - Excel 97 SR2 WinNT

Howdy all

I've been having a problem with Excel 97 crashing that I've been able to
narrow down through a process of elimination to the following cause (there
is no problem on WinXP Excel 2002 by the way):

Steps to produce a crash:

1) Create new workbook
2) Insert a Control Toolbar Checkbox on Sheet1.
3) In any cell on Sheet1, put something in a cell (so that when you choose
the Excel menu option 'Print Preview' it won't say 'nothing to print' and
will attempt to show a print preview) eg. type the letters 'text' in cell A1
of Sheet1.

4) Go to VBE, create new module, enter this code:

Sub ExampleCrash()
Worksheets("Sheet1").OLEObjects("Checkbox1").Delet e
End Sub

5) Run Macro

6) Return to Excel

7) Hit Print Preview

Excel crashes WITHOUT FAIL for me on a variety of machines with Excel 97 SR2
on WinNT. It is a large organisation where I'm working - 100s to 1000s of
users with same PC setup (so therefore I have no control over what my users
will be running).

Firstly, does this cause Excel 97 to crash for anyone else?
Secondly, what is the problem? Is my code the problem - if so, how can I
change it to stop Excel crashing?
Any suggestions as to how I can change the code to still achieve the same
effect but not crash Excel? Eg. maybe force a save after the macro or some
other trick of the trade / "workaround" that might prevent Excel from
crashing?

Thanks a lot for any help or ideas - I'm not sure where to start!!
Cheers
Matt


 
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
User-defined functions created in Excel 2000 fail in Excel 2003 goodguy Excel Discussion (Misc queries) 1 October 3rd 05 07:04 PM
Simple code crashes Excel John[_60_] Excel Programming 1 October 27th 04 05:59 PM
VBA File in EXCEL 2000 Crashes in code that I have made no changes Jim Excel Programming 2 August 31st 04 08:16 PM
why doesn't excel97 winNT vba macro code work in excel2002 winXP??? m a Excel Programming 4 June 23rd 04 06:20 PM
Code in ThisWorkbook crashes Excel Pat Beck Excel Programming 6 August 25th 03 09:07 AM


All times are GMT +1. The time now is 07:20 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"