Hi
I have a formula :
With this formula, the rows of a range where nothing is written are hidden ("")
But
When I protect the sheet, it gives error :
Run-time error '1004':
unable to set the Hidden property of the Range class
please help me
thanks
I have a formula :
VBA Code:
Dim xRg As Range
For Each xRg In Range("A2:A21")
If xRg.Value = "" Then
If xRg.EntireRow.Hidden = False Then
xRg.EntireRow.Hidden = True
End If
Else
If xRg.EntireRow.Hidden = True Then
xRg.EntireRow.Hidden = False
End If
End If
Next xRg
Application.ScreenUpdating = True
With this formula, the rows of a range where nothing is written are hidden ("")
But
When I protect the sheet, it gives error :
Run-time error '1004':
unable to set the Hidden property of the Range class
please help me
thanks