Hi Team,
I want to delete Visible cells after autofilter.it is deleting all rows(hidden Rows as well.)
Whats wrong with below code,
With wsInput.Range("A1").CurrentRegion
.AutoFilter FIELD:=cls_mod.Col_Month, Criteria1:="<>" & month
If .Columns(1).SpecialCells(xlCellTypeVisible).Count > 1 Then
.Offset(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
wsInput.Cells.AutoFilter
Else
wsInput.Cells.AutoFilter
End If
End With
Thanks
mg
I want to delete Visible cells after autofilter.it is deleting all rows(hidden Rows as well.)
Whats wrong with below code,
With wsInput.Range("A1").CurrentRegion
.AutoFilter FIELD:=cls_mod.Col_Month, Criteria1:="<>" & month
If .Columns(1).SpecialCells(xlCellTypeVisible).Count > 1 Then
.Offset(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
wsInput.Cells.AutoFilter
Else
wsInput.Cells.AutoFilter
End If
End With
Thanks
mg