Forum Discussion
tashaflies
Jan 27, 2021Copper Contributor
Macro generating Runtime error 1004 on PC but not Mac
Hi there! I have a simple macro in a workbook on my Mac, which works perfectly. But when my client tries to run it on her PC, she gets Runtime error 1004. She has enabled macros and trusted my source...
HansVogelaar
Jan 27, 2021MVP
The problem appears to be with Columns:=Array(1). Try this version:
Sub RefreshPivotTest()
'
' RefreshPivotTest Macro
'
ThisWorkbook.RefreshAll
Range("B7:B120").Copy Destination:=Range("N4")
Range("I5:I120").Copy Destination:=Range("N4").End(xlDown).Offset(1, 0)
Range("N4:N236").RemoveDuplicates Columns:=1
End Sub