Not executing command- vba Please Help

I have tried this code in other sheet it is , but it is not working properly in kitexl sheet, not executing last three line

Highlighted lines in Bold is skipping and going some other function
Please Help
Private Sub AutoFilter()
On Error Resume Next
Selection.AutoFilter Field:=6, Criteria1:="<-3%", Operator:=xlOr, Criteria2:=">3%"
Range("K5").PasteSpecial (xlPasteValues)
End Sub
  • HowUTrade

    Just remove the error handler 'On Error Resume Next'
    and run the code.

    If any error in the code, it will be thrown.
    Post the actual error you got here.
  • HAs
    i tried, but it jumping to some other modules,not executing the below command, so i have tried with on eeror resume next,
Sign In or Register to comment.