View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Run a macro when changing the sheet



Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)

Put your macro here

End Sub

"S. G." wrote:

I would like a macro to run every time the user changes of sheet.
Not when a cell is selected or changed, but immediately after changing the
sheet.
I want it to run also when a new sheet is added to the workbook.

Thank you in advance.