Hi all,
So far I have this code to run when multiple sheets are selected, but I want this to run everytime >1 sheets are selected, and that doesn't seem to be automatically happening when I select two sheetse. Any idea on how to automate this?
Sub GroupedCount()
Dim wdw As Window
Dim ws As Worksheet
On Error Resume Next
Set wdw = ActiveWindow
Dim Count As Long
Count = wdw.SelectedSheets.Count
If Count > 1 Then
MsgBox "WARNING! " & Count & " sheets are grouped", _
vbOKOnly + vbCritical, "Grouped Sheets"
End If
End Sub
So far I have this code to run when multiple sheets are selected, but I want this to run everytime >1 sheets are selected, and that doesn't seem to be automatically happening when I select two sheetse. Any idea on how to automate this?
Sub GroupedCount()
Dim wdw As Window
Dim ws As Worksheet
On Error Resume Next
Set wdw = ActiveWindow
Dim Count As Long
Count = wdw.SelectedSheets.Count
If Count > 1 Then
MsgBox "WARNING! " & Count & " sheets are grouped", _
vbOKOnly + vbCritical, "Grouped Sheets"
End If
End Sub