Thanks for the quick response. Below is the code for the two sections of the workbook.
Code to hide columns:
Sub Hide_Plan()
' Hide_Plan Macro
Columns("I:N").Hidden = True
Range("F7").Select
End Sub
The above code works fine if I don't filter the rows using the code below. I need to filter rows and then hide the above columns!
Code to filter rows:
Sub Button52_Click()
' Show all v1 tasks ( I have tagged these tasks with a V1 tag )
Dim strMeeting As String
strMeeting = Range("F7").Value
Application.ScreenUpdating = False
ActiveSheet.Unprotect
If ("All" = strMeeting) Then
Selection.AutoFilter Field:=5
Else
Selection.AutoFilter Field:=5, Criteria1:=strMeeting
End If
' Clear the selection filter
Selection.AutoFilter Field:=1, Criteria1:="V1"
Selection.AutoFilter Field:=2
Selection.AutoFilter Field:=3
Selection.AutoFilter Field:=4
Range("F12").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFiltering:=False
Application.ScreenUpdating = True
End Sub
Bookmarks