Im using pivot tables to make reports for my boss in excel. But she has no
idea how to use them so i recorded macros that set the different reports up
for her. The problem is i need the macro to clear the current layout in the
pivot
table before it applies the new layout.
Can you write a separate macro to do the clearing, and attach it to a
prominent button object that she can click before resetting.
Alternatively, put each pivot on a separate sheet and then all she
needs to do is open the required sheet.--
robert111
------------------------------------------------------------------------
robert111's Profile: www.excelforum.com/member.php...oamp;userid=31996
View this thread: www.excelforum.com/showthread...hreadid=523058i only know how to record and do some minor editing of macros. but i cant
figure what i need to stick in the begining of the macro to have clear the
layout, then apply the new layout.
quot;robert111quot; wrote:
gt;
gt; Can you write a separate macro to do the clearing, and attach it to a
gt; prominent button object that she can click before resetting.
gt;
gt; Alternatively, put each pivot on a separate sheet and then all she
gt; needs to do is open the required sheet.
gt;
gt;
gt; --
gt; robert111
gt; ------------------------------------------------------------------------
gt; robert111's Profile: www.excelforum.com/member.php...oamp;userid=31996
gt; View this thread: www.excelforum.com/showthread...hreadid=523058
gt;
gt;
You can hide all the fields:
Sub ClearPivot()
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)
For Each pf In pt.PivotFields
pf.Orientation = xlHidden
Next pf
End SubWike05 wrote:
gt; Im using pivot tables to make reports for my boss in excel. But she has no
gt; idea how to use them so i recorded macros that set the different reports up
gt; for her. The problem is i need the macro to clear the current layout in the
gt; pivot
gt; table before it applies the new layout.
gt;--
Debra Dalgleish
Excel FAQ, Tips amp; Book List
www.contextures.com/tiptech.html
- Oct 05 Fri 2007 20:40
Pivot Table Help
close
全站熱搜
留言列表
發表留言