I have VBA code in a macro which works fine in Excel 2003 but gives me an error when ran in Excel 2000. Can anyone please tell me what part of the code is incompatable and what I need to do to fix it so that is will work in both versions.
Thanks
Sub Button1_Click()
Range("AW9:CU" & Range("AX5").Value + 7).Select
Selection.Clear
Range("AW8:CU8").Select
Selection.Copy
Range("AW9:AW" & Range("A5").Value + 7).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A8").Select
Dim pt As PivotTable
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
pt.PivotCache.Refresh
Next pt
Next ws
End Sub
Thanks
Sub Button1_Click()
Range("AW9:CU" & Range("AX5").Value + 7).Select
Selection.Clear
Range("AW8:CU8").Select
Selection.Copy
Range("AW9:AW" & Range("A5").Value + 7).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A8").Select
Dim pt As PivotTable
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
pt.PivotCache.Refresh
Next pt
Next ws
End Sub