I am getting error code while running my Macro:
Run-time error 450: Wrong number of arguments or invalid property assignment
Basically I need to only filter 3 texts XBKK
, XBKF
and XMAI
and I'm unable to do so with below code.
Dim OrigLines, LiveData As Long
Dim FirstRow As Integer
OrigLines = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
FirstRow = 1
Sheets("Paste_SDR").Select
Range("$A$1:$FB" & OrigLines).Copy
Sheets("SDR - working").Select
Range("A1").Select
Selection.PasteSpecial
Rows("1:1").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$FB" & OrigLines).AutoFilter Field:=126, Criteria1:= _
"<>*XBKK*", Operator:=xlAnd, Criteria2:="<>*XMAI*", Operator:=xlAnd, Criteria2:="<>*XBKF*"
If Range("A" & Rows.Count).End(xlUp).Row > FirstRow Then
Range("$A$2:$FB" & OrigLines).SpecialCells(xlCellTypeVisible).Delete Shift:=xlUp
End If