VBA to Ahk remove duplicates

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
blue83
Posts: 157
Joined: 11 Apr 2018, 06:38

VBA to Ahk remove duplicates

01 Feb 2019, 08:12

Hi,

Does anyone know how to translate this code to ahk?

ActiveSheet.Range("$A$1:$G$13").RemoveDuplicates Columns:=Array(1, 7), Header _
:=xlYes
IMEime
Posts: 750
Joined: 20 Sep 2014, 06:15

Re: VBA to Ahk remove duplicates

01 Feb 2019, 09:27

Code: Select all

xl.ActiveSheet.Range("$A$1:$G$13").RemoveDuplicates(1, True)
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: VBA to Ahk remove duplicates

01 Feb 2019, 09:29

Code: Select all

#SingleInstance, Force

xlApp := ComObjActive("Excel.Application")
xlApp.ActiveSheet.Range("A1:G13").RemoveDuplicates(1, 1) ; Columns = 1, xlYes = 1
User avatar
Datapoint
Posts: 294
Joined: 18 Mar 2018, 17:06

Re: VBA to Ahk remove duplicates

01 Feb 2019, 16:16

blue83 wrote:
01 Feb 2019, 08:12

Code: Select all

    ActiveSheet.Range("$A$1:$G$13").RemoveDuplicates Columns:=Array(1, 7), Header _
        :=xlYes

Code: Select all

VT_VARIANT := 0xC
xlYes := 1
numberOfColumns := 2
Columns := ComObjArray(VT_VARIANT, numberOfColumns)
Columns[0] := 1
Columns[1] := 7
xlApp := ComObjActive("Excel.Application")
xlApp.ActiveSheet.Range("A1:G13").RemoveDuplicates(Columns, xlYes)
blue83
Posts: 157
Joined: 11 Apr 2018, 06:38

Re: VBA to Ahk remove duplicates

01 Feb 2019, 16:28

Wow, thank you on your help.
IMEime
Posts: 750
Joined: 20 Sep 2014, 06:15

Re: VBA to Ahk remove duplicates

01 Feb 2019, 21:33

@Datapoint
I was not clear about the Array part
Nice !! You made it clear

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mcd, NullRefEx and 124 guests