Hi All,
Can you please let me on below VBA code , I have recorded VBA to do some filtering on my data then I have added lines to unprotect then protect the sheet as below, now I want to allow user to filter one specific column to filter on sheet by adding to my current VBA, can you please help me in this regard:
Sub Piping()
ThisWorkbook.Worksheets("sheet1").Unprotect ("GEG")
' Piping Macro
'
'
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveSheet.Range("$A$2:$T$2095").AutoFilter Field:=21, Criteria1:="P"
ThisWorkbook.Worksheets("sheet1").Protect ("GEG")
End Sub
Can you please let me on below VBA code , I have recorded VBA to do some filtering on my data then I have added lines to unprotect then protect the sheet as below, now I want to allow user to filter one specific column to filter on sheet by adding to my current VBA, can you please help me in this regard:
Sub Piping()
ThisWorkbook.Worksheets("sheet1").Unprotect ("GEG")
' Piping Macro
'
'
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveSheet.Range("$A$2:$T$2095").AutoFilter Field:=21, Criteria1:="P"
ThisWorkbook.Worksheets("sheet1").Protect ("GEG")
End Sub