All, In vba, I can turn off screen redrawing activities by setting screenupdating = false.
I'm positive I came across a similar command in (VS 2005), but for the life of me, I can't seem to remember what it is.
Though, if you update control positions all at once, then you shouldn't see any adverse effects.
To do this: ' Add the following code snippet on top of Form1Imports Excel = Microsoft.
Active Sheet ' Add table headers going cell by cell.
By setting Screen Updating to False at the Start of the macro, you will not only stop the constant screen flickering associated with recorded macro, but also greatly speed up the execution of the macro.
The reason it speeds up code is because Excel no longer needs to repaint the screen whenever it encounters such commands as Select, Activate, Large Scroll, Small Scroll and many others. Screen Updating=False should be placed at the Start of your macro like shown below Note how we have set the Screen Updating back to True on completion.
Remember to set the Screen Updating property back to True when your macro ends.
This example demonstrates how turning off screen updating can make your code run faster.When you run this example, you can compare the respective running times, which are displayed in the message box. Screen Updating = True For i = 1 To 2 If i = 2 Then Application. Screen Updating = False start Time = Time Worksheets("Sheet1"). This can happen with recorded macros that have the word Select used frequently.If this does happen, you may need to repeat the line: Application.It also means that we cannot tell the macro recorder to not record our steps of selecting cells, sheets and scrolling around, even though the selecting of cells, sheets and scrolling is not needed in true VBA code.