Hi folks,
I've had this code working but for some reason it keeps stopping working with a 1004 error (unable to set the hidden property of the range class) and I cant figure out why - do you have any idea?
There is other code in there but essentially I'm trying to hide/unhide rows, in this example row 24, initially and if any drop down option is selected (cell c23) then it reappears.
The worksheet is password protected btw
I've had this code working but for some reason it keeps stopping working with a 1004 error (unable to set the hidden property of the range class) and I cant figure out why - do you have any idea?
There is other code in there but essentially I'm trying to hide/unhide rows, in this example row 24, initially and if any drop down option is selected (cell c23) then it reappears.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Row_int As Integer
Dim Check_Rng As Range
Dim N_int As Integer
Dim Hide_row_int As Integer
Application.ScreenUpdating = False
[B]If Target.Address = "$C$23" Then[/B][B] Rows("24").Hidden = True[/B]
[B] If Target.Value <> "" Then[/B]
[B] Rows("24").Hidden = False[/B]
[B] End If[/B]
[B]End If
[/B]Application.ScreenUpdating = True
end sub
The worksheet is password protected btw