Hello all,
I have been recently tasked with taking over a report someone else created and distributed to several individuals throughout the company. The person who created this made some macros that when a certain range of cells are double clicked one would hide all unused rows and the other would unhide all rows. Well now when someone goes and clicks the unhide rows button it keeps all the rows hidden still. And if I manually unhide because the hidding of rows is done based off a filter and then click unhide all rows it hides all the ones that the hide button does. HEre is are the codes for both. There is a formula in column A to determine if the row show be hidden or not displaying either blank or "hide". Any help would be greatly appreciated. Here is are the codes for both.
Sub SNAPSHOT_ROWS_HIDE()
'
' SNAPSHOT_ROWS_HIDE Macro
'
'
ActiveWorkbook.Save
ActiveSheet.Unprotect Password:="ave5warV2"
Application.ScreenUpdating = False
ActiveSheet.Range("$A:$A").AutoFilter Field:=1, Criteria1:="<>*HIDE*" _
, Operator:=xlAnd
ActiveSheet.Protect Password:="ave5warV2", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingRows:=True, AllowFiltering:= _
True
End Sub
Sub SNAPSHOT_ROWS_UNHIDE()
'
' SNAPSHOT_ROWS_UNHIDE Macro
'
'
ActiveWorkbook.Save
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="ave5warV2"
ActiveSheet.Range("$A:$A").AutoFilter Field:=1, Criteria1:=Array("0", _
"HIDE", "="), Operator:=xlFilterValues
ActiveSheet.Protect Password:="ave5warV2", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingRows:=True, AllowFiltering:= _
True
End Sub
I have been recently tasked with taking over a report someone else created and distributed to several individuals throughout the company. The person who created this made some macros that when a certain range of cells are double clicked one would hide all unused rows and the other would unhide all rows. Well now when someone goes and clicks the unhide rows button it keeps all the rows hidden still. And if I manually unhide because the hidding of rows is done based off a filter and then click unhide all rows it hides all the ones that the hide button does. HEre is are the codes for both. There is a formula in column A to determine if the row show be hidden or not displaying either blank or "hide". Any help would be greatly appreciated. Here is are the codes for both.
Sub SNAPSHOT_ROWS_HIDE()
'
' SNAPSHOT_ROWS_HIDE Macro
'
'
ActiveWorkbook.Save
ActiveSheet.Unprotect Password:="ave5warV2"
Application.ScreenUpdating = False
ActiveSheet.Range("$A:$A").AutoFilter Field:=1, Criteria1:="<>*HIDE*" _
, Operator:=xlAnd
ActiveSheet.Protect Password:="ave5warV2", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingRows:=True, AllowFiltering:= _
True
End Sub
Sub SNAPSHOT_ROWS_UNHIDE()
'
' SNAPSHOT_ROWS_UNHIDE Macro
'
'
ActiveWorkbook.Save
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="ave5warV2"
ActiveSheet.Range("$A:$A").AutoFilter Field:=1, Criteria1:=Array("0", _
"HIDE", "="), Operator:=xlFilterValues
ActiveSheet.Protect Password:="ave5warV2", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingRows:=True, AllowFiltering:= _
True
End Sub