Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Code Stops Running After a File is Opened

Status
Not open for further replies.

timfoster

Programmer
Dec 19, 2002
110
GB
Here's a weird one.

I've got an Excel workbook with macros. The macros seem to have stopped working. Not only that, but it appears to prevent them working in other workbooks once the problematic one has been opened too.

The dodgy book opens and runs a macro to show the correct sheet. The user clicks a button on this sheet to jump to other sheets. This seems to work. However, the double-click code doesn't work at all. From that point forward none of the sheet specific seems to work either. Worse still, I created a blank book and added some code to a double-click event. This works fine until the dodgy book is opened. Even if I close it again, the blank book still doesn't work.

Anyone got any ideas?
 
do you disable events using
application.enableevents = false
in any code anywhere - not necessarily this workbook?

how many of the failing procedures are event driven?

what happens if you run something simple such as
sub terraneanmindnumb()
msgbox "hello world"
end sub
?

any eaxamples of code that 'stops' or code that works?


;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Ha! Loomah, you are a genius! Indeed it was. Staring me in the face was a line of application.enableevents = false with a corresponding true that had been commented out!

It's the obvious things that you miss when you're looking for something more complex!!

Thanks very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top