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

- Jun 7, 2010 at 10:31 AM - Latest reply:  D - Jun 7, 2010 at 03:33 PM
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!


See more 

2 replies

Best answer
Posts
4481
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
January 6, 2016
Jun 7, 2010 at 10:51 AM
6
Thank you
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

Thank you, rizvisa1 6

Something to say? Add comment

CCM has helped 1692 users this month

Thank you!!! Very helpful!