RemoveDuplicates Excel VBO help
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-01-19 06:23 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-01-19 06:03 PM
Hello,
Please try
range.RemoveDuplicates Columns:=Array(1, 2), Header:=1
Joshua

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-01-19 09:28 AM
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
