Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2011, 01:55 AM
e093223 e093223 is offline VBA: Recording a macro to insert a PIVOT table Windows XP VBA: Recording a macro to insert a PIVOT table Office 2007
Novice
VBA: Recording a macro to insert a PIVOT table
 
Join Date: Oct 2011
Posts: 1
e093223 is on a distinguished road
Default VBA: Recording a macro to insert a PIVOT table

Hello!

I am currently learning VBA programming and am trying to do the following:



Record a macro to:
1) Select a set of data
2) Make a pivot table out of it in a new sheet


I have tried doing this, but get an error message. I think this is because I somehow need to make both the new sheet name/number and the new pivot table name/number dynamic? At the moment the code says e.g. "insert sheet 3" and create "pivot table 3", where of course the number will change when I repeat the process? I would want to repeat the process for an unlimited amount of times though without having to change the code every time.

The code runs if you press ctrl-shift-A in the document attached.

I would be really, really grateful for any help!

Thanks!
Attached Files
File Type: xlsm VBAQ_3-3_charts.xlsm (60.9 KB, 14 views)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Recording a macro to insert a PIVOT table Pivot Table Karen615 Excel 5 08-03-2011 10:46 AM
Recording Macro Tutorials JesseAitchison Word VBA 0 07-24-2011 05:36 PM
pivot table design 2 dmonroe Excel 2 11-15-2010 09:15 AM
Pivot Table Refresh tpcervelo Excel 0 09-14-2010 06:54 AM
VBA: Recording a macro to insert a PIVOT table Pivot Table's fields janis129 Excel 7 03-02-2010 03:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft