I am trying to write an excel filter action. Here is what I have in Blue Prism:
Dim wb, ws as Object
Dim excel, sheet, range As Object
wb = GetWorkbook(Handle, Workbookname)
ws = GetWorksheet(Handle, Workbookname, Worksheetname)
wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
range = sheet.Range(DataRange)
ws.range.Autofilter (Field:=[field1], Criteria1:=[criteria1], _
Operator:=[operator1], Criteria2:=[criteria2])
Original filter code in VBA:
'ActiveSheet.Range("$A$4:$U$1747").AutoFilter Field:=8,
'Criteria1:="=*Spl*", Operator:=xlAnd, Criteria2:="=*Harbor"
I received the following error: Number of parameters specified does not match the expected number.
Please advise what has to be adjusted. Can a method in VBA have more than 2 parameters? Could that be an issue?