Hi, I am having an issue with my macro where the hide rows formula works for 1 tab but not another -
The below script is not working
Sub Hide_PA()
'
' Hide/Unhide Port Agency Sheet
If Range("L1") = False Then
Sheets("2013 Budget").Select
Application.Goto Reference:="PAr"
Selection.EntireRow.Hidden = True
Application.Goto Reference:="PAs"
Selection.EntireRow.Hidden = True
Sheets("Overview").Select
Range("A1").Select
Else
Sheets("2013 Budget").Select
Application.Goto Reference:="PAr"
Selection.EntireRow.Hidden = False
Application.Goto Reference:="PAs"
Selection.EntireRow.Hidden = False
Sheets("Overview").Select
Range("A1").Select
End If
End Sub
but next section does?
Sub Hide_SPA()
'
' Hide/Unhide Port Agency Strategy Sheet
If Range("K1") = False Then
Sheets("2014-2015 Strategy Plan").Select
Application.Goto Reference:="SPAr"
Selection.EntireRow.Hidden = True
Application.Goto Reference:="SPAs"
Selection.EntireRow.Hidden = True
Sheets("Overview").Select
Range("A1").Select
Else
Sheets("2014-2015 Strategy Plan").Select
Application.Goto Reference:="SPAr"
Selection.EntireRow.Hidden = False
Application.Goto Reference:="SPAs"
Selection.EntireRow.Hidden = False
Sheets("Overview").Select
Range("A1").Select
End If
End Sub
I have named the rows to hide as 2 separate named ranges for the 2 rows on each tab but it won't hide on the first tab.
Any help on resolving this would be greatly appreciated.
Thanks
Bookmarks