All my macros have stopped working--Please help

J

jeninOk

All my macros (Word and Excel) which were working a few days ago have stopped
working. They just stop randomly and save the macro execution was stopped.
I may have a virus? If so, what's the best resolution?

Thanks!

PS I've already had the code checked and is fine
 
S

StevenM

To: JeninOk,

Have you re-booted your computer? I know from experience that when I'm
working on a project, and good code seems to misbehave, that re-booting my
computer will solve whatever is wrong. Of course, if re-booting doesn't solve
your problem, then it would appear that you have a more serious problem, and
I would be unable to offer any further advice.

-Steven Craig Miller
 
T

Tony Jollans

This is not a virus; it is a 'feature' :-(

Slowly more and more reports of this are coming in, but, as yet, there is no
known solution or workaround.

You can click on Continue - or press Alt+C - and your code will continue,
but you may have to do it several times. Once it has started happening, it
seems to continue until, at least, all Office applications have been closed
(at the same time) and then restarted, and sometimes until after rebooting.
When it does happen it affects macros in all Office applications.
 
S

StevenM

To: Tony,

Your comments appear to suggest that this is not normal or expected
behavior. While I'm not a professional programmer, I've been at this for a
number of decades, working in a number of different environments and computer
languages. Re-booting one's computer while writing code has been par for the
course for many decades. If it is less expected now, and the need is less
frequent, that is only because the hardware and software are getting better.
And the solution seems obvious: write code without any mistakes and you wont
experience any problems.

Steven Craig Miller
 
T

Tony Jollans

Hi Steven,

It is not normal or expected .. but it does happen sometimes. I have
experienced it myself on several occasions and reports of it are getting
more common - as the user base increases, I suppose. Thus far, no consistent
triggers have been identified.

I haven't rebooted my daily use computer for months now, and am not in any
rush to do so. I don't believe it's de rigeur any more, although, as you
say, it used to be a routine requirement (on PCs anyway).

The solution may be obvious, although it's rather glib to put it the way you
do. However, this issue has nothing to do with code I wrote, and I have no
control over code Microsoft writes.
 
J

jeninOk

The macros are very long and the documents they are running on are huge, so I
did these things:

1. Began each macro with:
Options.Pagination = False
Application.EnableCancelKey = xlDisabled
(of course, turn these back on at the end of the macro)

2. At the end of each routine that did much, I inserted:
ActiveDocument.UndoClear

This worked OK, but still a few gliches, so I put:
Application.EnableCancelKey = xlDisabled

at the beginning of every routine in the macros.

Yuk!!!! -- They run now without stopping, but of course, I cannot press
escape if I do need to stop the macro -- now I have to ctrl+alt+del -- ugly.
 
T

Tony Jollans

You seem to be mixing up Excel and Word but disabling Cancel is
interesting - I shall try that next time I stumble into the problem. Thank
you.
 

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