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.
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:=quot;Sheet1!R1C1:R5C2quot; to
SourceData:=ActiveSheet.Name amp; quot;!R1C1:R5C2quot;
--Brucequot;Coreyquot; wrote:
gt; I'm trying to incorporate a pivot table creation in a macro, but can't get
gt; around the specific name of the sheet it's identifying. For instance, the
gt; code states '1205 Aging' as the sheet name in the code. Obviously this would
gt; be different each month so the macro wouldn't be 'universal'. Any ideas?
gt;
gt; Thanks.
Thanks! That worked fine.
quot;bpeltzerquot; wrote:
gt; If the macro will be run from the sheet containing the data, you can replace
gt; the SourceData portion of the code to reference the ActiveSheet, rather than
gt; using a fixed sheet name. For example, change
gt; SourceData:=quot;Sheet1!R1C1:R5C2quot; to
gt; SourceData:=ActiveSheet.Name amp; quot;!R1C1:R5C2quot;
gt; --Bruce
gt;
gt;
gt; quot;Coreyquot; wrote:
gt;
gt; gt; I'm trying to incorporate a pivot table creation in a macro, but can't get
gt; gt; around the specific name of the sheet it's identifying. For instance, the
gt; gt; code states '1205 Aging' as the sheet name in the code. Obviously this would
gt; gt; be different each month so the macro wouldn't be 'universal'. Any ideas?
gt; gt;
gt; gt; Thanks.
- Dec 18 Mon 2006 20:34
Record Pivot Table Macro
close
全站熱搜
留言列表
發表留言