I have a spreadsheet that I have been using for some time.
Suddenly, in just the Worksheet_change event procedure, break points will not work.
In the same sheet break points do work for other events.
I've tried everything.
Can anyone help?
DesM
I have a spreadsheet that I have been using for some time.
Suddenly, in just the Worksheet_change event procedure, break points will not work.
In the same sheet break points do work for other events.
I've tried everything.
Can anyone help?
DesM
Hi
So events are definitely still firing (ie events have been disabled with something like Application.EnableEvents = False)? Are other events on this sheet that you are trapping still working, or are all events on this particular sheet failing to function (if so, perhaps there is some corrpution at work)?
It might be worth just going into the VBE, opening up the Immediate Window (Ctrl+G) and checking on Events with:
and checking it does return True.Please Login or Register to view this content.
Richard
Richard Schollar
Microsoft MVP - Excel
Thanks for reply.
Yes, the break point works on other events (doubleClick and selectionChange) on the same sheet. And these call macros.
The event itself is firing because I have put Msgbox in several places and it comes up.
A funny thing too: the event is meant to call a macro but it is not (and it did a week ago). I made up a new macro (just to show MsgBox) and called it and this works. The macros are on different module sheets.
I've tried making a copy of the sheet, deleting the code in it's module sheet, and then repasting it in from Notepad. No difference.
I also tried a Code Cleaner.
Hope you can help.
DesM
Can you post the workbook itself? (You can remove any sensitive data)
Everyone who confuses correlation and causation ends up dead.
Thanks, here is the workbook.
The Input sheet is the one to focus on.
When you select a cell in the B column, it offers you a dropdown. When you select, this triggers a change event which should trigger the CopyFormula macro (which copies formulea from the Transactions Range to the active row).
Regards,
DesM
Looks like DV and breakpoints do not mix.
If you change a cell in column S on input sheet then breakpoint will work as expected.
Andy, thanks for input.
Forgive my ignorance, but what is "DV"?
Is there a solution? (maybe when I know what DV is I will be obvious).
DesM
DataValidation, ie. the dropdown list.
No work around that I can see,
The following are also ignored.
Please Login or Register to view this content.
I'm very puzzled. Please have a look at the attached workbook - it works fine!
Also, my accounts workbook worked fine up until this week.
DesM
Something screwy with your workbook. If I type VAT instead of pick it from the list then the breakpoint works.
I can also copy the sheet to a new workbook and get it to break.
If I comment out all event code except msgbox in change event and then unhide the opening Accs and Trans rows it starts working.
Andy, I've just opened a version I saved two weeks ago and everything works fine.
Do you think, given my limited VBA capability, that I would be better rebuilding the changes I made since then into this, rather than trying to persevere with finding the problem in the modified version?
Help appreciated.
DesM
Yes, assuming you know the changes.
Do it a small step at a time. Add the event code with calls to empty routines.
Once that is working start populating the routines constantly checking that all is still working and breaking.
Thanks Andy for advice.
DesM
I know this is an old thread, but in case somebody else finds it here's the solution I discovered (almost certainly not the same problem as in the OP).
I had the problem with breakpoints not stopping the code. I was additionally confused because even if I edited the code, the macro would execute as if the code had not been edited. This was easy to see because I was deleting columns in the table and could not get it to change which columns were deleted.
The problem was that the changes I made (including adding breakpoints) were not recognized while I had the Find/Replace popup open. As soon as I closed that little window everything worked as expected. Strange bug.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks