SheetDeactivate Event

Microsoft Excel Visual Basic

SheetDeactivate Event

       

Occurs when any sheet is deactivated.

Private Sub object_SheetDeactivate(ByVal Sh As Object)

object   Application or Workbook.

Sh   The sheet. Can be a Chart or Worksheet object.

Example

This example displays the name of each deactivated sheet.

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
    MsgBox Sh.Name
End Sub