Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 2003, and have a spreadsheet with a lot of formulas (Most
cells from a1 to IV1700 have formulas in them). I have the spreadsheet set to calculate manually. I have a command button that triggers a macro, which the code in the macro is just the one word "Calculate". If I press F9, the spreadsheet calculates fine, but if I click on the command button, it gives me the "Out of stack space" error. How can I fix this? Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200909/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
please show us your code. Typically this is caused bt calling a subroutine
and not returning correctly. When a sub i scalled, the return address is pushed onto the stack, and then this is removed when the sun returns control back ...if this fails, then the returns build up indefinitely on the stack...this eats memory...and eventually you get the failure "Bshawn via OfficeKB.com" wrote: I am using Excel 2003, and have a spreadsheet with a lot of formulas (Most cells from a1 to IV1700 have formulas in them). I have the spreadsheet set to calculate manually. I have a command button that triggers a macro, which the code in the macro is just the one word "Calculate". If I press F9, the spreadsheet calculates fine, but if I click on the command button, it gives me the "Out of stack space" error. How can I fix this? Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200909/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just a guess...
I'm guessing that you have a worksheet_calculate or Workbook_SheetCalculate event that's firing because of the calculation and it may be calling other events that call themselves or the _calculate event. I'd try: Sub yourmacronamehere() with application .enableevents = false .calculate .enableevents = true end with end sub But it's just a guess. The .enableevents tells excel to stop looking for triggers that cause events to fire. "Bshawn via OfficeKB.com" wrote: I am using Excel 2003, and have a spreadsheet with a lot of formulas (Most cells from a1 to IV1700 have formulas in them). I have the spreadsheet set to calculate manually. I have a command button that triggers a macro, which the code in the macro is just the one word "Calculate". If I press F9, the spreadsheet calculates fine, but if I click on the command button, it gives me the "Out of stack space" error. How can I fix this? Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200909/1 -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked! Thanks.
Dave Peterson wrote: Just a guess... I'm guessing that you have a worksheet_calculate or Workbook_SheetCalculate event that's firing because of the calculation and it may be calling other events that call themselves or the _calculate event. I'd try: Sub yourmacronamehere() with application .enableevents = false .calculate .enableevents = true end with end sub But it's just a guess. The .enableevents tells excel to stop looking for triggers that cause events to fire. I am using Excel 2003, and have a spreadsheet with a lot of formulas (Most cells from a1 to IV1700 have formulas in them). I have the spreadsheet set [quoted text clipped - 6 lines] Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200909/1 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200909/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Out of Stack Space error | Excel Discussion (Misc queries) | |||
Out of Stack space error | Excel Programming | |||
Error 28 out of stack space | Excel Programming | |||
OUT OF STACK SPACE ERROR | Excel Programming | |||
Runtime 28 - Out of stack space | Excel Programming |