Please help - run macro when switching sheets [Solved/Closed]

Report
-
 D -
Hello,

If someone could tell me how to run a macro upon switching worksheets, that would be extremely helpful. If this is not possible, perhaps running a macro upon clicking a new cell? I just don't want the workbook to move too slowly with every click running the macro.

Thank you!


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
762
You have to use either of the two routines in the sheet

This you would be using if you want macro to be fired as sheet is deactivated
Private Sub Worksheet_Deactivate()

End Sub

This you would be using if you want macro to be fired as sheet is activated
Private Sub Worksheet_Activate()

End Sub
6
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Thank you!!! Very helpful!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!