Sub scope_removal()
Worksheets("Detailed assessment Criteria").Activate
Dim rng As Range, cell As Range
Set rng = Range("G2:G1000")
For Each cell In rng
If cell = "No" Then cell.EntireRow.Hidden = True Else cell.EntireRow.Hidden = False
Next cell
End Sub
Private Sub Worksheet_Activate()
'Modified 4/16/2019 9:56:14 AM EDT
Cells(1, 1).Value = ActiveSheet.Name
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
'Modified 4/16/2019 10:06:35 AM EDT
MsgBox "Hello You just activated sheet named " & ActiveSheet.Name
End Sub
Private Sub Worksheet_Activate()Cells(1, 1).Value = ActiveSheet.Name
Dim Answer As String
Dim MyNote As String
MyNote = "Would you like to check controls have been removed?"
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
Else
Call scope_removal
MsgBox "Controls have been checked!"
End If
End Sub