cancel
Showing results for 
Search instead for 
Did you mean: 

RemoveDuplicates Excel VBO help

KoogunNa
Level 2
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.
2 REPLIES 2

JoshuaKingsley
Level 4
Hello,   Please try range.RemoveDuplicates Columns:=Array(1, 2), Header:=1   Joshua

Anonymous
Not applicable
Hi Joshua, I think Blueprism can not be able to deal with this code.   Does anyone know how to deal with the Array? Datatype:String can not be converted to Array in blueprism.   Tsai