Hi everyone.
I am trying to create RemoveDuplicates Excel VBO and having troubles with the code
-------------------------------------------------
Dim wb, ws As Object
Dim excel, sheet, range As Object
Try
wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)
wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
range = sheet.Range(Reference)
range.RemoveDuplicates(Columns:=Array(1, 2), Header:=1)
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
wb = Nothing
ws = Nothing
excel = Nothing
sheet = Nothing
range = Nothing
End Try
---------------------
I get an error on "Array(1,2)", description saying compiler error.
If anyone could provide advice, I would be really grateful.
Thanks.