excel macro
Microsoft Office Training McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams add this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Excel Macro

Excel Macro

The UK's most regular instructor-led training courses.
Training information: application development excel · Advanced.excel · Microsoft Excel Training UK
See also · excel-courses-london · excel courses in london · excel microsoft training

resolvedResolved · Medium Priority · Version 2003

Excel Macro

Hannes has attended:
No courses

by - delegate Hannes [4 posts] (2008 Jun 12 Thu, 16:18) replyReply

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?

Excel Advanced 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2009 Jan 14 Wed Bloomsbury 5 book now £235 £245
2002/XP 2009 Jan 14 Wed Tooting 0 FULL    
2003 2009 Jan 16 Fri Southwark 0 FULL    
2007 2009 Jan 21 Wed Bloomsbury 3 book now £240 £245
2003 2009 Jan 21 Wed Southwark 2 book now £235 £240
2003 2009 Jan 23 Fri Bayswater 4 book now £195 £205
Full Schedule: See all 113 Excel Advanced course dates.
Bookings currently available until 31st March 2010.

RE: Excel Macro

by - delegate Hannes [4 posts] (2008 Jun 16 Mon, 11:23) replyReply

Hi Guys,

I found a way to buypass this issue with some creative programming.


Related articles

· Crazy Things People Have Done With Excel
· Microsoft Excel Courses Teach Advanced Macro Techniques
· How to Create Better Excel Spreadsheets: Part Three
· Interesting Lifestyle Applications for Microsoft Excel
· Microsoft Excel Training Advanced Courses - Making Data Validation Work For You

Please browse our web site to find out more about
application development excel and other Microsoft training courses.

Excel tip:

Closing Multiple Workbooks quickly

When you have several workbooks open in Excel and want to just close them all at once:

1) Hold down the SHIFT key before selecting the File menu.

2) Once in File menu release SHIFT key and select Close All option.

3) All your files will close. If files require saving Excel will ask if you want to save the changes.

View all Excel hints and tips

Rate this page:
3.0/5 (5 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Training venues
Client list
FAQ
Pricing and availability
Course details / Syllabus

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London
Microsoft Office training

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
Microsoft access courses · Microsoft training access course
Microsoft+access+training · Access courses in london

Training Information
Training Articles

AddThis Social Bookmark Button What's this?
Add to: Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo