Trigger macro when nr of sheets changes
Try this alternative solution, and let us know if it causes any other
problems
Dim NumSheets
Private Sub Workbook_Open()
NumSheets = ThisWorkbook.Sheets.Count
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim sActive As Object
If ThisWorkbook.Sheets.Count < NumSheets Then
NumSheets = ThisWorkbook.Sheets.Count
MsgBox ActiveSheet.Name
End If
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Workbook_SheetActivate ActiveSheet
End Sub
The Purbecks clouded over :-))
Bob
(remove nothere from email address if mailing direct)
"Sige" wrote in message
oups.com...
Oops.
1.A bit too fast ... : When deleting a sheet ...it triggers ...but
only when clicking another sheet first.
|