VBA to Ahk remove duplicates

Get help with using AutoHotkey and its commands and hotkeys
blue83
Posts: 32
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: 1259
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
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
Datapoint
Posts: 51
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: 32
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”

Who is online

Users browsing this forum: roses21+ and 125 guests