View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Marty Marty is offline
external usenet poster
 
Posts: 116
Default VBA Stops Working?

Thanks Jim.

If I'm turning events on and off I'm not doing it intentionally. I have no
..EnableEvents code in my procedures. Nevertheless, thanks for the
suggestion. I'll try it.

I'm still puzzled as to why it's happening though.

"Jim Thomlinson" wrote:

As a guess are you turning events on and off in your code. If for some reason
there is a leak some where you may be turning events off without turning them
back on again. To check this next time it happens manually run this code to
see if the problem is fixed.

public sub ResetEvents
application.enableevents = true
end sub

That's my best guess.
HTH

"Marty" wrote:

Hello:

Excel 2003. I've noticed with some of my workbooks, particularly if I've
been working with them for a while, sometimes the code in the workbook will
not execute. For example, If I have a button or cell-change macro
programmed, sometimes the code will not execute if I click the button or
change the cell.

When I close Excel and re-open the workbook, it works fine.

Has anyone else noticed this? (Maybe you can point me to a knowledge base
article or something. I didn't see one.)

Thanks in advance,
MARTY