Krishnakumar
Well-known Member
- Joined
- Feb 28, 2003
- Messages
- 2,615
Hi All,
Any idea why the first one is not working ?
TIA
Code:
Dim a(1 To 3) As Long
a(1) = 1: a(2) = 2: a(3) = 3
'This is not working
ActiveSheet.Range("$A$1:$C$40").RemoveDuplicates Columns:=a, Header:=xlYes
'This works
ActiveSheet.Range("$A$1:$C$40").RemoveDuplicates Columns:=Array(1, 2, 3), Header:=xlYes
Any idea why the first one is not working ?
TIA