nikki333
01-28-2018, 04:47 AM
Hi Forum,
Sub test()
Dim ws As Worksheet: Set ws = A99
ws.Range("A1: D454").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
End Sub
Anybody an idea why this gives a runtime error 5. It' basically the same as the macro recorder did, which removed the duplicates
ActiveSheet.Range("$A$1:$D$454").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
Sub test()
Dim ws As Worksheet: Set ws = A99
ws.Range("A1: D454").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
End Sub
Anybody an idea why this gives a runtime error 5. It' basically the same as the macro recorder did, which removed the duplicates
ActiveSheet.Range("$A$1:$D$454").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes