|
|
|
date: Sat, 10 May 2008 20:34:17 -0700,
group: microsoft.public.word.vba.beginners
back
Re: Stack Space
LadyDungeness@Fish.Net wrote:
> When I try to run one of the macros, I get error #28, Out of Stack Space. I have
> to use the Task Manager to shut down Word. What is this error? How can I fix it?
Typically, that means you've entered a situation where two or more routines are
calling each other non-stop, or even a single routine is recursively calling itself.
Sometimes, these situations are non-intuitive. You could try putting a breakpoint
in the suspected problem routine (with F9), then use F8 to single step through it
one line at a time, to see if the logic error becomes obvious. As Jonathan
suggests, for us to do more than offer the crudest of guesses (as above), you'd have
to provide the code that's causing the failure.
--
.NET: It's About Trust!
http://vfred.mvps.org
date: Mon, 12 May 2008 16:48:32 -0700
author: Karl E. Peterson
Re: Stack Space
That sounds like a good idea.
How to I add a break point?
Do you mean that I can use F8 to run a macro bit by bit? What command do I access from the toolbar in order to invoke that
procedure?
Lady Dungeness
Out of Danger until September
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
On Mon, 12 May 2008 16:48:32 -0700, "Karl E. Peterson" wrote:
>LadyDungeness@Fish.Net wrote:
>> When I try to run one of the macros, I get error #28, Out of Stack Space. I have
>> to use the Task Manager to shut down Word. What is this error? How can I fix it?
>
>Typically, that means you've entered a situation where two or more routines are
>calling each other non-stop, or even a single routine is recursively calling itself.
>Sometimes, these situations are non-intuitive. You could try putting a breakpoint
>in the suspected problem routine (with F9), then use F8 to single step through it
>one line at a time, to see if the logic error becomes obvious. As Jonathan
>suggests, for us to do more than offer the crudest of guesses (as above), you'd have
>to provide the code that's causing the failure.
date: Mon, 12 May 2008 19:46:12 -0700
author: unknown
Re: Stack Space
"LadyDungeness@Fish.Net" wrote:
>
> Cool! Two of my favorite helpers, too. :-)
>
> Actually, I had stumbled across the break points. I thought they were there to make the macro easier for me to read. LOL. I
> can make good use of that technique.
>
Also, sometimes, I find it very useful to see what is going on in the
document as I debug. So, I size the VBA Editor window so that it as wide as
the screen, but barely 10% of the height or so. Then I place it at the
bottom. Then I size the Document window to use the rest of the screen space.
This way, when I debug by stepping through the code, I can see what is
hapenning in the document.
Sometimes, before hitting F8 to go on to the next line, I go into the
document, change the selection, undo the last action, add text... etc. Then
in the VBA window, I drag the yellow arrow back to the line I just executed
and execute it again to see if a different environment has an impact or not.
Alternatively, sometimes I add code above/below the line I just executed,
then I undo the last action in the document window and drag the yellow arrow
to the beginning of the new code to see its impact.
All this is to help me find better solutions to problem I observe, but
without having to run the code from the start every time I try something new,
this is particularly useful with longer/complex macros.
Good luck!
date: Wed, 14 May 2008 09:50:01 -0700
author: Jean-Guy Marcil
Re: Stack Space
"Jean-Guy Marcil" wrote in message
news:9CE7F0CB-3FCA-450F-92F3-D94C2D25576B@microsoft.com...
> "LadyDungeness@Fish.Net" wrote:
>
>>
>> Cool! Two of my favorite helpers, too. :-)
>>
>> Actually, I had stumbled across the break points. I thought they were
>> there to make the macro easier for me to read. LOL. I
>> can make good use of that technique.
>>
>
> Also, sometimes, I find it very useful to see what is going on in the
> document as I debug. So, I size the VBA Editor window so that it as wide
> as
> the screen, but barely 10% of the height or so. Then I place it at the
> bottom. Then I size the Document window to use the rest of the screen
> space.
> This way, when I debug by stepping through the code, I can see what is
> hapenning in the document.
I have two screens, one for the document, one for the code. Very useful for
serious development!
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
date: Wed, 14 May 2008 19:32:36 +0100
author: Jonathan West
Re: Stack Space
great suggestions. Thanks!
Two screens -- you mean two monitors? I'd love to do that. My motherboard is about 9 years old though, so I'm not sure if
it would work. I don't know how to hook up more than one monitor. There's only one of the ports for the monitor cables.
Oh well.
Split screen is a good idea. The VBA editor is kind of clunky -- or else I haven't figured out a good way to mess around in
there.
Lady Dungeness
Out of Danger until September
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
On Wed, 14 May 2008 19:32:36 +0100, "Jonathan West" wrote:
>
>"Jean-Guy Marcil" wrote in message
>news:9CE7F0CB-3FCA-450F-92F3-D94C2D25576B@microsoft.com...
>> "LadyDungeness@Fish.Net" wrote:
>>
>>>
>>> Cool! Two of my favorite helpers, too. :-)
>>>
>>> Actually, I had stumbled across the break points. I thought they were
>>> there to make the macro easier for me to read. LOL. I
>>> can make good use of that technique.
>>>
>>
>> Also, sometimes, I find it very useful to see what is going on in the
>> document as I debug. So, I size the VBA Editor window so that it as wide
>> as
>> the screen, but barely 10% of the height or so. Then I place it at the
>> bottom. Then I size the Document window to use the rest of the screen
>> space.
>> This way, when I debug by stepping through the code, I can see what is
>> hapenning in the document.
>
>I have two screens, one for the document, one for the code. Very useful for
>serious development!
date: Thu, 15 May 2008 09:55:58 -0700
author: unknown
Re: Stack Space
wrote in message
news:mlqo24hlfunk1iu0usf3jds9ff03n472io@4ax.com...
> great suggestions. Thanks!
>
> Two screens -- you mean two monitors?
Exactly so. Two nice big 19" monitors side-by-side :-)
> I'd love to do that. My motherboard is about 9 years old though, so I'm
> not sure if
> it would work. I don't know how to hook up more than one monitor.
> There's only one of the ports for the monitor cables.
>
> Oh well.
Unless you go for the extreme budget end, newer PCs usually have two video
output sockets, one for conventional SVGA and one for the new digital DVI
output. You can buy a DVI-SVGA converter for a few dollars and then hook up
a monitor to each one.
Failing that, it is possible to buy an additional graphics card and fit it,
and hook up the extra monitor to that, though as Jean-Guy suggests, you may
need to be careful about compatibility with your existing system. Ask at the
shop.
A further option is to buy a laptop. Most laptops have an external video
output into which you can plug an extra screen, and you can set it up so
that both the built-in and extra screens are working at the same time.
>
> Split screen is a good idea. The VBA editor is kind of clunky -- or else
> I haven't figured out a good way to mess around in
> there.
It is an application in its own right. It takes a while to learn it. Don't
assume that things wok there the sme as they do in Word itself - the VBA
editor was used for the standalone verion of VB long before VBA was
integrated into Office, and the VB people had their own way of doing things
:-)
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
date: Fri, 16 May 2008 09:45:03 +0100
author: Jonathan West
|
|