Screen updating macro
The Go To Control action then moves the focus to the Category ID field, where you can begin to enter data for the new product.This macro should be attached to the Add Products button on the Suppliers form.command or whenever formulas need to be re-calculated.
If you turn echo off, you can use the Hourglass action to change the mouse pointer into an hourglass icon (or whatever mouse pointer icon you've set for "Busy") to provide a visual indication that the macro is running.
This isn't commonly used when your macro is short and quick to run, but longer/slower macros can employ this as it speeds up the runtime of the macro.
This is because Excel no longer has to refresh the screen every time the macro uses a Scroll, Activate, Select, etc.
It's best to do it at the beginning of the macro, but you can also switch it on and off repeatedly as many times as you like in a macro (if there is something specific you want to have updated while the macro runs).
To switch screen updating off add the following line to your code: And don't worry - when the macro ends and the focus switches back to Excel, screen updating is automatically enabled again, so while it's always a good idea to remember to enable screen updating again at the end of your code, it's not completely necessary!