Re: Excel hangs
- From: "GrahamS" <GrahamS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Feb 2006 06:08:27 -0800
Ed,
Yup there is quite a lot more to the app - as described in the original post
:-O. There is however very little code. The variable fred is simply a test
variable, the cell F10 is another test cell (empty). The problem exists for
any cell being set from within the VBA code :-(.
Its not really a problem with the code as shown but with the whole app - in
that 'AutoCalc' seems to kick in when I update any cell from VBA - and then
proceeds to 'lock up'. If Control-Break worked I wouldn't have a problem, as
I could then step through the code :-).
Hit a reakpoint on that one line 'Range("xxx").Value = anything' - F8 to
step over the line and autocalc seems to kick in and bang - dead. Turn off
autocalc and its fine !!. Steps over the code, sets the cell - all good.
Its probably something stupid in one cell, but I have no means of finding
out what it is - no error displayed or any other clue :-(.
So - the maybe I should repost question as 'How to debug autocalc crashes'
???.
Thanks
G.
"Ed" wrote:
.Agreed that the code on its own does not fail :-O. It fails when in thefull
Excel application.Is there more to this entire code routine, then, than just what you've
posted? If there's more code, than you need to look at where else you've
used F10 and see if you've got it pointing back on itself somewhere.
Also try defining fred as a certain type of variable and see if that helps.
Ed
"GrahamS" <GrahamS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E137267A-DAAC-4A33-AD78-0C9596D1C8A1@xxxxxxxxxxxxxxxx
Peter,full
Thanks for the reply.
Agreed that the code on its own does not fail :-O. It fails when in the
Excel application.as
If autocalc is turned on, I can step through the code until the point at
which the range is used to update the cell - then the app just hangs.
If I turn autocalc off it works just fine. Even works if I press F9 on the
spread*** - well I say works, nothing happens and it doesn't lock up -
there is no change on the ***, there is nothing to recalc.into
So - the problem I have is that somehow autocalc appears to be running
a loop :-O. How do I find out what and why ???.to
The app is for my daughters exam coursework and I'm sure that she wouldn't
mind me sending it privately to you if this will help. The problem seems
appear on most platforms :-O.rights.
Thanks
regards
Graham
""Peter Huang" [MSFT]" wrote:
Hi
Based on my test, simply the code as you post did not seem to hang the
excel.
Commonly we can use Ctrl+Break to stop a macro executing.
Also I think you may try to post the Debug.print in the loop.
e.g.
For each ...
'Add the code line
Debug.Print "blabla..."
Next
If if the problem is occurred in the loop, a Debug.Print will keep print
out the text "blabla...."
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
- Follow-Ups:
- Re: Excel hangs
- From: "Peter Huang" [MSFT]
- Re: Excel hangs
- References:
- Excel hangs
- From: Oxns
- Re: Excel hangs
- From: keepITcool
- Re: Excel hangs
- From: Oxns
- Re: Excel hangs
- From: "Peter Huang" [MSFT]
- Re: Excel hangs
- From: Ed
- Excel hangs
- Prev by Date: Re: 255 character limit
- Next by Date: Re: autorun macro by pressing hyperlink, help
- Previous by thread: Re: Excel hangs
- Next by thread: Re: Excel hangs
- Index(es):