Vb6 disable screen updating

16 Sep

To demonstrate the principle of this technique we'll need a small example procedure that makes lots of visible changes to the Excel workbook.

You can either download the example here, or create a new blank workbook, add around five worksheets to it and then copy the code shown below into a new module.

Word does not need to display itself in order to run.Although it would be difficult to do an exhaustive test, in theory this should work from any Automation client-Visual Basic, Excel, Power Point, or any other.The functionality depends on Word, not on the Automation client.To achieve this we need to add a single line of code to the subroutine, just below the variable declarations.It's probably also worth changing the colour that we're using so that we can see when things have changed. This time you won't be able to see the macro carrying out its tasks; once the subroutine has finished the screen will update once at the end to show you the final result.