Although Excel will set this back to True whenever focus is passed back to Excel (in other words, when your macro finishes), in most cases it pays to play it safe and include the code at the end.
I have a file ("MENU TOTAL.xlsm") that has a macro to open other Excel files, retrieve data from them storing it in a variable, and then close the workbooks without saving.
The thing is, the opened Excel files have macros that run automatically and have, within the code, the Application. Everytime I run the macro in "MENU TOTAL.xlsm", I'd like NOT TO see the other workbooks opening and closing.
I guess this happens because the opened file has a macro (that also triggers the Screenupdating off and on...) that runs automatically when it is opened. Is there an alternative command to Screenupdating, or a way to stop auto-run macros from running? I hope someone can shed some light on this subject... Open Filename:=nomesficheiros(num_ficheiros_do_pais) Active Workbook.
It will automatically turn onwhen the macro is finished.If you need to update page numbers, you will have to show the application window before doing the update: With See Page X of Y displays or prints as Page 1 of 1, Page 2 of 2 etc. I hear rumors that you may also need to work with the Range object instead of the Selection object, but I have not tested this nearly enough to give a list because I do almost all of my work with Ranges.By turning off the screen updating your macros will run much faster.If you have played around a bit with macros or dabbled in VBA code, you might have heard of the to False at the start of a macro, you will not only stop the constant screen flicker associated with a recorded macro, but also speed up the macro's execution.
The reason this method speeds up code is because Excel no longer needs to repaint the screen whenever it encounters commands such as back to True on completion.
Word does not need to display itself in order to run.