PC Review


Reply
Thread Tools Rate Thread

What can cause Excel to crash?

 
 
Charles
Guest
Posts: n/a
 
      12th Dec 2006
Excel (2002 SP3) crashes regularly on several of my model, most of the
time when I open the spreadsheet. Was wondering what could cause this
unstability. The main model I use is specific in the following way:

- more than 500 range names are used
- user defined functions:
- array UDF
- one UDF returning an array of 10,000 rows but with an array
formula defined on only 20 rows (this basically allow me to return a
variable number of rows (20 in this case), since there is no way to
know what is the size of the output of an array UDF
- lot of array calculations (excel formula). A list of 2000 entries,
with a lot (probably 10,000 cells) of calculations based on the whole
column
- file size of 5Mb

the spreadsheet is nearly brand new, so hopefully no weird stuff like
circular reference or #REF.

Any thought?
Charles

 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      12th Dec 2006
Charles,

Your UDF returning an array can know what size to return: here's an example:

Function ArrayF() As Variant
Dim ReturnArray() As Integer
Dim i As Integer
Dim j As Integer
Dim myRows As Long
Dim myCols As Long

myRows = Application.Caller.Rows.Count
myCols = Application.Caller.Columns.Count

ReDim ReturnArray(1 To myRows, 1 To myCols)

For i = 1 To myRows
For j = 1 To myCols
ReturnArray(i, j) = i * j
Next j
Next i

ArrayF = ReturnArray

End Function

Also, depending on your array calculations, you may be able to replace a lot of them with a
PivotTable.... depends.

--
HTH,
Bernie
MS Excel MVP


"Charles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Excel (2002 SP3) crashes regularly on several of my model, most of the
> time when I open the spreadsheet. Was wondering what could cause this
> unstability. The main model I use is specific in the following way:
>
> - more than 500 range names are used
> - user defined functions:
> - array UDF
> - one UDF returning an array of 10,000 rows but with an array
> formula defined on only 20 rows (this basically allow me to return a
> variable number of rows (20 in this case), since there is no way to
> know what is the size of the output of an array UDF
> - lot of array calculations (excel formula). A list of 2000 entries,
> with a lot (probably 10,000 cells) of calculations based on the whole
> column
> - file size of 5Mb
>
> the spreadsheet is nearly brand new, so hopefully no weird stuff like
> circular reference or #REF.
>
> Any thought?
> Charles
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2007 crash when saving a specific file as excel 2003 format Frustrated Microsoft Excel Crashes 0 18th Jul 2008 12:44 PM
Excel 2003 Additional Workbooks After Excel Crash =?Utf-8?B?Y29tcG91bmQ=?= Microsoft Excel Programming 1 20th Jun 2007 04:48 PM
Excel VBA Form crash,Mac OS X, Excel 2004 for Mac, version 11.1 =?Utf-8?B?V2lsbGlhbSBhdCBDb3JuZWxs?= Microsoft Excel Crashes 0 7th Jan 2005 04:05 PM
Unknown crashing in Excel 2000 - doesn't crash in Excel XP. Please help! winjer23 Microsoft Excel Discussion 6 25th Aug 2004 10:03 AM
Crystal report in Excel format makes Excel crash =?Utf-8?B?T0c=?= Microsoft Excel Crashes 0 30th Oct 2003 12:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 PM.