Application.Calculate - Runtime Error

P

PCLIVE

Does anyone know why the following line might cause a Runtime Error?

Application.Calculate

I understand that the surrounding code may be suspected to be involved, but
running the same Macro twice will not necessarilly have a problem.
Additionally, this has occurred in other Sub routines on the same code. The
runtime error pops up, I go to Debug and that line is highlighted. If I hit
F8, it runs that line with no problem....or if I hit F5, it continues
running.

Any ideas?

Thanks,
Paul

--
 
P

PCLIVE

Doesn't anyone know of a circumstance in which the line
"Application.Calculate" might cause a Runtime Error?

The exact error is:

____________________________________________
Run-time error '1004':

Cannot run Visual Basic macro because of a syntax error.
____________________________________________

I am able to 'Debug' and the Calculate line is what is highlighted. I can
continue step by step (F8) or I can continue fully (F5). In one case I have
a looping sequence and it errors every time on this line. But it will
always continue if I tell it to using F5 or F8. In this particular looping
sequence, it happens over and over for as many times as it loops. It's
frustrating. It also happens on different computers using the same file(s).
Excel 2002.

Thanks for any ideas.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top