First, let me say thanks in advance for looking at this for me. I've been racking my brain trying to figure this out error and I'm stuck.
Below is my code which I am getting the, "Run Time Error '1004': Unable to set the Hidden property of the Range class". What is interesting is that the rows hide/unhide as commanded THEN I get the error message. Annoying. I get the error on line: c.EntireRow.Hidden = True
Thanks again!
Sub Hide_Rows_Containing_Value_All_Sheets()
Dim c As Range
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
For Each c In ws.Range("A16:A83").Cells
If c.Value = "" Then
c.EntireRow.Hidden = True
End If
Next c
Next ws
End Sub
Sub Unhide_All_Rows()
For Each ws In ActiveWorkbook.Worksheets
For Each c In ws.Range("A16:A83").Cells
If c.Value = "" Then
c.EntireRow.Hidden = False
End If
Next c
Next ws
End Sub
Below is my code which I am getting the, "Run Time Error '1004': Unable to set the Hidden property of the Range class". What is interesting is that the rows hide/unhide as commanded THEN I get the error message. Annoying. I get the error on line: c.EntireRow.Hidden = True
Thanks again!
Sub Hide_Rows_Containing_Value_All_Sheets()
Dim c As Range
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
For Each c In ws.Range("A16:A83").Cells
If c.Value = "" Then
c.EntireRow.Hidden = True
End If
Next c
Next ws
End Sub
Sub Unhide_All_Rows()
For Each ws In ActiveWorkbook.Worksheets
For Each c In ws.Range("A16:A83").Cells
If c.Value = "" Then
c.EntireRow.Hidden = False
End If
Next c
Next ws
End Sub