ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2000 - Function call causes Locking up/Crashing (https://www.excelbanter.com/excel-programming/316636-excel-2000-function-call-causes-locking-up-crashing.html)

Basharat A. Javaid

Excel 2000 - Function call causes Locking up/Crashing
 
In my application (consisting Excel 2000 worksheets), I have many
user-defined functions/procedures. On one worksheet, a function MyFunction1
is called. Once in MyFunction1, depending on the parameters involved,
another function MyFunction2 may or may not be called.

When I run my application it works fine if MyFunction2 is not called from
MyFunction1 and the workbook is updated and saved automatically with a new
name. However, if parameters are such that MyFunction2 is called from
MyFunction1, the application still works, the new file name is created but
it just hangs there at the point of saving the file. At that point,
although I can navigate the various worksheets, I cannot edit anything on
any worksheets. If I try to save the file with File-Save, it crashes and I
get the Send Error Report/Don't Send ... dialog box.

All the calculations are correct.

I have tried putting a Stop at the point where file is saved with a new
name. When the execution is halted at Stop, if I try to save the file with
File-Save, it crashes and I get the Send Error Report/Don't Send ... dialog
box.

MyFunction2 has no direct connection to saving the file module.

It looks like something is causing an endless loop at the point of saving!?
If I recalculate with Ctrl+Alt+F9, I do not get this loop. I have stepped
through MyFunction2 and everything works fine and there is no endless loop
(or any loop).





--
Basharat.




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com