I am trying to make two macros: one that hides rows based on a criterion in a certain column, and another that unhides rows based on the same criterion.
Here is the code for the first macro, which works fine:
Sub hide()
Dim item As Variant
For Each item In Range("f:f")
If item = "complete" Then item.EntireRow.hidden = True
Next
End Sub
It's the second macro, the unhiding one, that doesn't work for me. Excel tells me it cannot run the macro or all macros have been disabled. Here is the code for the second macro:
Sub Unhide()
Dim item As Variant
For Each item In Range("f:f")
If item = "complete" Then
item.EntireRow.hidden = False
Next
End Sub
If it's relevant, each macro is located in its own module.