98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Excel Macro
Excel Macro
Resolved · Medium Priority · Version 2003
Hannes has attended:
No courses
Excel Macro
Hi,
I've recorded the following macro:
'''''''''''''''''''''''''''''''''''''''
Workbooks.Open Filename:= _
"C:\Data\Financial Planning Macro Building Project\A020 DEVELOPED MARKETS.xls"
Windows("Trans and Volumes.xls").Activate
Range("C7").Select
Sheets("Data Sheet").Select
Windows("A020 DEVELOPED MARKETS.xls").Activate
Application.Run "'A020 DEVELOPED MARKETS.xls'!MENU"
Application.Run "'A020 DEVELOPED MARKETS.xls'!ISSCTR"
Range("A4").Select
ActiveWorkbook.ShowPivotTableFieldList = True
ActiveSheet.PivotTables("PivotTable6").PivotFields("BRAND").CurrentPage = _
"MASTERCARD"
Range("BA23:BI24").Select
Selection.Copy
'''''''''''''''''''''''''''''''''''''''''''''''
My goal is once the macro is run to open antoher file and make changes on the pivot in that file and then to copy the result to the original file.
Everytime I run the macro it fails and show an error in the section which selects the pivot and changes the pivot fields.
I think this might have to do with the fact that the excel file is protected.
Any suggetions on how I can get this to run?
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Apply Autosum with keyboard shortcutIf you press Alt and = at the same time, it applies autosum. |