Vba enableevents screenupdating

Posted by / 26-Jun-2020 16:59

Vba enableevents screenupdating

The following is a simple illustration of the issue:- Cell "A1" has data validation, on a list "=fruit" with "Ignore Blank" and "In cell drop-down" ticked.

"fruit" is a named range (somewhere) containing the values The worksheet has the following VBA macro...

In certain circumstances, the data validation coughs, the on Change macro fires (repeatedly) and the VBA code fails with error 50290.

Pressing DELETE clears the cell entry and causes the drop-down values to appear - at this point (with no user action beyond pressing DELETE) the on Change macro fires (Bug #2 ? ) - however after clicking OK to the "Sheet Change macro fired" prompt, a VBA error 50290 "Method 'Screen Updating' of object '_Application' failed" is reported.

After clicking END, the macro fires again and again each time failing in the same way.

Delete Next My Shape Exit Sub End If For Each My Shape In Active Sheet.

If yes, where is the code Screen Updating and Enable Events must be placed (the most fitting place)?

vba enableevents screenupdating-73vba enableevents screenupdating-51vba enableevents screenupdating-64

One thought on “vba enableevents screenupdating”