I use application.statusbar to keep the users apprised of what is happening.I have tried using application.screenupdating = false both before I branch to a report subroutine and also within the report subroutine in an attempt to keep it from shifting the focus to the report page, but it is not working.
Could this be causing the application.screenupdating zorvek, I need to activate the tabs, because I need to access their command bars in order to refresh the data on the report.
Even if I restore the control tab before turning screen updating back on, wouldn't there still be a flash to the report tab while it's activated?
There's always a object method you can call that does not require and form of screen updating.
Let us see more of your code, including the areas that you believe require activating new sheets, and maybe we have a workaround.
After the macro is finished, the status bar will show as follows – So similarly, you can update the status bar at different parts of the code, so that the user knows what is happening as the macro is running.
Here is a pic of the status bar while the macro is running. So, the debug.prints are correct, reflecting the fact that screen updating is off. Screen Updating didn't catch any change in the Screen Updating Property? and then put a debug print after the called sub ends and the code returns to the original sub. A selected sheet comes to the top even though screen updating is off. And then put a debug.print before/after each line (including before after the select line). and then put a debug print after the called sub ends and the code returns to the original sub. Well that narrows it down to the selecting I guess, and I guess further that it's specifically the selection of a sheet that wasn't the active sheet when you launched the macro. And then put a debug.print before/after each line (including before after the select line). Enable Events = True End Sub Sub DP_disbursement() Dim number_disbursements As Integer Application.