HI All,
I'm currently have current code as below, if activecell is empty or active cells count > 1, then exit sub; however, TargetCells.Count > 1 not working well, still shows an error. also, how do i insert code for "auto unfilter current worksheet when i go to another worksheet on the same workbook". thank you
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Value = "" Or Target.Cells.Count > 1 Then Exit Sub
Selection.AutoFilter Field:=ActiveCell.Column, Criteria1:=ActiveCell.Value
End Sub
End Sub
I'm currently have current code as below, if activecell is empty or active cells count > 1, then exit sub; however, TargetCells.Count > 1 not working well, still shows an error. also, how do i insert code for "auto unfilter current worksheet when i go to another worksheet on the same workbook". thank you
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Value = "" Or Target.Cells.Count > 1 Then Exit Sub
Selection.AutoFilter Field:=ActiveCell.Column, Criteria1:=ActiveCell.Value
End Sub
End Sub