Error

G

Guest

My macros disable screenupdating.
Is it possible to enable the screen updating if an error
occurs in my code due to a situation in the spreadsheet
prior to displaying the debug situation.
 
N

Nick Hodge

In simple code you could use something like

Sub test()
On Error GoTo myerror
With Application
.ScreenUpdating = False
Worksheets("DoesntExist").Select
.ScreenUpdating = True
End With

myerror:
Application.ScreenUpdating = True

End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
Top