View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Corey
 
Posts: n/a
Default Record Pivot Table Macro

Thanks! That worked fine.

"bpeltzer" wrote:

If the macro will be run from the sheet containing the data, you can replace
the SourceData portion of the code to reference the ActiveSheet, rather than
using a fixed sheet name. For example, change
SourceData:="Sheet1!R1C1:R5C2" to
SourceData:=ActiveSheet.Name & "!R1C1:R5C2"
--Bruce


"Corey" wrote:

I'm trying to incorporate a pivot table creation in a macro, but can't get
around the specific name of the sheet it's identifying. For instance, the
code states '1205 Aging' as the sheet name in the code. Obviously this would
be different each month so the macro wouldn't be 'universal'. Any ideas?

Thanks.