Use this code template as a starting point (the error handler ensures that these properties are turned back on at the end of the sub, even if it errors) Sub Your Sub() On Error Go To EH Application. Select Next i 'get results results = "Screen Updating not disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" start Time = Time 'scenario 2 - screenupdating disabled Application.Screen Updating = False 'swap between sheets 1/2 (need both sheets or this will crash) For i = 1 To numb Switches Sheets(1 (i Mod 2)). Screen Updating = True 'get results for part two results = results & vb Cr Lf & "Screen Updating IS disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" 'show results Msg Box results End Sub Firstly I've been using the script written by Richie (UK) Post #7 Here It simply iterates through a loop changing the value of i in one cell.One thing you may want to do with your macro to make it run faster and to prevent distracting flashes on the screen is to turn off screen updating while the macro is running.The following macro lines will, respectively, turn off screen updating and then turn it back on in a VBA macro.The idea is to use the first line near the beginning of your macro, and then use the second line near the end.
button to visit the description and screenshots of the tool on the website.
Let me know if you think that you have a better solution! NET) Class to handle the changing of settings and storing of original state: Public Class Application Settings Implements IDisposable Private Screen Updating As Boolean Private Events As Boolean Private Production As Boolean = True Public Sub New() My Base.
I always assumed it was just used so that it didn't scare end users into thinking their PC was about to crash.
Restore All Settings(); Here is my own solution that I have come up with to solve the problem.
It seems simpler to me than the other suggested solutions.