#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default stake space

Hi. I have a macro which kept throwing a 'out of stake space error'.
Ive read a bit here about stake space and confess I dont really
understand the beast. I found my error was down to an endless loop,
which Ive since fixed. My concern is this. The Data that the macro
analyzers, is fed live into the worksheet about every 1 secs. I cant
alter this as its an external software doing the feeding. My macro is
in the 'worksheet calculate'. Therefore the macro fires every 1 secs.
This is not a problem as such, because Iv put conditions in, which will
only add data to a modeless form when met. After saying that I also
added a counter at all possible condition, plus when conditions arnt
met, to see how many times the macro fires. The data coming in is from
Bacarat games, theres 5/6 rounds for each game. About 20 seconds
between rounds. So in a typical game the macro fires 100 times, not
necesarily doing anything, but firing all the same. Is this using stack
space. And if so If I left it running all the time, would I run out of
stack space. I have no static variables in my macro. Also theres
nothing in the macro that retains any values.(I think!). All values are
either added to worksheet or Form. Hope this makes sense.
Regards Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default stake space

If your macro only calculates and moves cell values around, you should be
OK, as long as your code has no leaks and/or infinite loops, as you have
found out.
If you have copy/paste of sheets, charts, graphics, etc you may run into
memory resource problem.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi. I have a macro which kept throwing a 'out of stake space error'.
Ive read a bit here about stake space and confess I dont really
understand the beast. I found my error was down to an endless loop,
which Ive since fixed. My concern is this. The Data that the macro
analyzers, is fed live into the worksheet about every 1 secs. I cant
alter this as its an external software doing the feeding. My macro is
in the 'worksheet calculate'. Therefore the macro fires every 1 secs.
This is not a problem as such, because Iv put conditions in, which will
only add data to a modeless form when met. After saying that I also
added a counter at all possible condition, plus when conditions arnt
met, to see how many times the macro fires. The data coming in is from
Bacarat games, theres 5/6 rounds for each game. About 20 seconds
between rounds. So in a typical game the macro fires 100 times, not
necesarily doing anything, but firing all the same. Is this using stack
space. And if so If I left it running all the time, would I run out of
stack space. I have no static variables in my macro. Also theres
nothing in the macro that retains any values.(I think!). All values are
either added to worksheet or Form. Hope this makes sense.
Regards Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default stake space

Thanks for the reply. Im not using charts/graphics or copy/paste so
should be ok there. Is there any line of code I can add to show stack
space?. Thanks again.
Regards Robert
NickHK wrote:
If your macro only calculates and moves cell values around, you should be
OK, as long as your code has no leaks and/or infinite loops, as you have
found out.
If you have copy/paste of sheets, charts, graphics, etc you may run into
memory resource problem.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi. I have a macro which kept throwing a 'out of stake space error'.
Ive read a bit here about stake space and confess I dont really
understand the beast. I found my error was down to an endless loop,
which Ive since fixed. My concern is this. The Data that the macro
analyzers, is fed live into the worksheet about every 1 secs. I cant
alter this as its an external software doing the feeding. My macro is
in the 'worksheet calculate'. Therefore the macro fires every 1 secs.
This is not a problem as such, because Iv put conditions in, which will
only add data to a modeless form when met. After saying that I also
added a counter at all possible condition, plus when conditions arnt
met, to see how many times the macro fires. The data coming in is from
Bacarat games, theres 5/6 rounds for each game. About 20 seconds
between rounds. So in a typical game the macro fires 100 times, not
necesarily doing anything, but firing all the same. Is this using stack
space. And if so If I left it running all the time, would I run out of
stack space. I have no static variables in my macro. Also theres
nothing in the macro that retains any values.(I think!). All values are
either added to worksheet or Form. Hope this makes sense.
Regards Robert


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default stake space

Whilst debugging, you can ViewCall Stack.
Whilst running, the VBE does not exposes anything natively, but there
probably are ways using additional code. Pretty hairy unless you really want
to go there.
If you just want to see the memory usage, there the various
Application.MemoryXXX function, although they never seem very accurate.

NickHK

"RobcPettit" wrote in message
ups.com...
Thanks for the reply. Im not using charts/graphics or copy/paste so
should be ok there. Is there any line of code I can add to show stack
space?. Thanks again.
Regards Robert
NickHK wrote:
If your macro only calculates and moves cell values around, you should

be
OK, as long as your code has no leaks and/or infinite loops, as you have
found out.
If you have copy/paste of sheets, charts, graphics, etc you may run into
memory resource problem.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi. I have a macro which kept throwing a 'out of stake space error'.
Ive read a bit here about stake space and confess I dont really
understand the beast. I found my error was down to an endless loop,
which Ive since fixed. My concern is this. The Data that the macro
analyzers, is fed live into the worksheet about every 1 secs. I cant
alter this as its an external software doing the feeding. My macro is
in the 'worksheet calculate'. Therefore the macro fires every 1 secs.
This is not a problem as such, because Iv put conditions in, which

will
only add data to a modeless form when met. After saying that I also
added a counter at all possible condition, plus when conditions arnt
met, to see how many times the macro fires. The data coming in is

from
Bacarat games, theres 5/6 rounds for each game. About 20 seconds
between rounds. So in a typical game the macro fires 100 times, not
necesarily doing anything, but firing all the same. Is this using

stack
space. And if so If I left it running all the time, would I run out of
stack space. I have no static variables in my macro. Also theres
nothing in the macro that retains any values.(I think!). All values

are
either added to worksheet or Form. Hope this makes sense.
Regards Robert




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default stake space

Thanks NickHK, Ill stick to debugging. Maybe if the error comes up
again, I will look further, but until then...... Thanks for taking the
time to reply.
Regards Robert

NickHK wrote:
Whilst debugging, you can ViewCall Stack.
Whilst running, the VBE does not exposes anything natively, but there
probably are ways using additional code. Pretty hairy unless you really want
to go there.
If you just want to see the memory usage, there the various
Application.MemoryXXX function, although they never seem very accurate.

NickHK

"RobcPettit" wrote in message
ups.com...
Thanks for the reply. Im not using charts/graphics or copy/paste so
should be ok there. Is there any line of code I can add to show stack
space?. Thanks again.
Regards Robert
NickHK wrote:
If your macro only calculates and moves cell values around, you should

be
OK, as long as your code has no leaks and/or infinite loops, as you have
found out.
If you have copy/paste of sheets, charts, graphics, etc you may run into
memory resource problem.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi. I have a macro which kept throwing a 'out of stake space error'.
Ive read a bit here about stake space and confess I dont really
understand the beast. I found my error was down to an endless loop,
which Ive since fixed. My concern is this. The Data that the macro
analyzers, is fed live into the worksheet about every 1 secs. I cant
alter this as its an external software doing the feeding. My macro is
in the 'worksheet calculate'. Therefore the macro fires every 1 secs.
This is not a problem as such, because Iv put conditions in, which

will
only add data to a modeless form when met. After saying that I also
added a counter at all possible condition, plus when conditions arnt
met, to see how many times the macro fires. The data coming in is

from
Bacarat games, theres 5/6 rounds for each game. About 20 seconds
between rounds. So in a typical game the macro fires 100 times, not
necesarily doing anything, but firing all the same. Is this using

stack
space. And if so If I left it running all the time, would I run out of
stack space. I have no static variables in my macro. Also theres
nothing in the macro that retains any values.(I think!). All values

are
either added to worksheet or Form. Hope this makes sense.
Regards Robert



Reply
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
Space removal - a first name,space last name Tech Express Excel Discussion (Misc queries) 4 February 9th 09 08:24 PM
Can I automatically add space after ea. row ("Space After" in Word Reddheddz Excel Discussion (Misc queries) 0 June 17th 08 05:55 PM
Stake calculator Marie1uk Excel Worksheet Functions 1 April 17th 06 01:21 AM
formula that will go up one space if no value in specified space skammi Excel Worksheet Functions 1 November 16th 05 03:28 PM
Paper Space / Model Space ? Coolboy55 Excel Discussion (Misc queries) 0 September 1st 05 08:58 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"