Supressing worksheet jumping

mr_pivot

New Member
Joined
Sep 2, 2009
Messages
6
I have created a macro to go to 5 worksheets and update filters on each sheet. I did this via recording mouse clicks. As I expected, when I run the macro it jumps to each worksheet and back to a cell on my starting worksheet.

Is there a way to set this up to updated the filters without having to jump to each worksheet? Can I suppress the worksheets from being displayed and update the filters without actually seeing this on screen?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hello and welcome to MrExcel.

Try adding this line near the top of your macro

Code:
Application.ScreenUpdating = False

and set it to True before the End Sub statement.

Or post your recorded code and it can probably be cleaned up to avoid selecting sheets at all.
 
Upvote 0
Put this at the beggining of your code
Application.ScreenUpdating = False
and this at the end
Application.ScreenUpdating = True
 
Upvote 0
Thanks.

I use them to make up for my lack of knowledge in VBA. It helps to learn code once I have done it thru mouse clicks.
 
Upvote 0
Nothing wrong with recording macros at all. I still use the recorder when I can't remember the syntax for commands that I rarely use (like manipulating charts). But the recorder does a lot of selecting which is unnecessary and slows the code down.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top