Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros in PERSONAL.XLS

Excel 2003; Windows XP OS. I have a series of macros in my PERSONAL.XLS
workbook that create a number of different pivot tables. I can't set up to
run automatically, as I must create the datatables daily and they are a
different size each day. The macros must be executed in the order they were
created or they 'bomb'. When I look at the VBA code, each different macro
contains a numbered pivottable reference, reflecting its creation order (e.g.
PivotTable3). Is there a way to make the references valid regardless of the
order in which they are executed?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Macros in PERSONAL.XLS

When you create the PivotTable with code you have the opportunity to give it
your own name, record a macro and look at the arguments, eg
TableName:="<pivotTable-name"

When you want to refer that PivotTable later

Dim pt As PivotTable
Set pt = ActiveWorkbook.Worksheets("Sheet1").PivotTables("m yPvtTble")

Regards,
Peter T


"mdmaremont" wrote in message
...
Excel 2003; Windows XP OS. I have a series of macros in my PERSONAL.XLS
workbook that create a number of different pivot tables. I can't set up
to
run automatically, as I must create the datatables daily and they are a
different size each day. The macros must be executed in the order they
were
created or they 'bomb'. When I look at the VBA code, each different macro
contains a numbered pivottable reference, reflecting its creation order
(e.g.
PivotTable3). Is there a way to make the references valid regardless of
the
order in which they are executed?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down list using macros in a personal macros workbook jlcoop01 Excel Programming 0 October 23rd 09 03:56 PM
Macros always available in Personal.xls? scouser Excel Programming 8 November 15th 08 02:08 PM
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
Personal.xls Macros? Chris Excel Programming 3 June 11th 04 02:17 PM
Personal.xls Macros Mark Excel Programming 3 December 7th 03 11:03 PM


All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"