Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default pivot field definition in VBA

How can I get VBA to figure out what is in position 1 or 2 or whatever of the
rows in a table? In other words, when I am recording a macro and, for
example, dragging out a row field, the recording takes the actual name of
that field and makes it invisible. But if I am in a situation where a user
is going to be manipulating this and I want Excel to automatically take out,
say, the second grouping of a table, without my knowing ahead of time what
that second grouping will be at the time the macro is run, then how do I tell
it "drag out whatever field is in position 2"?

Thx.
--
Boris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default pivot field definition in VBA

Boris, try:

ActiveSheet.PivotTables("SalesPvt").ColumnFields(2 ).Orientation = xlHidden


--
HTH
Roger
Shaftesbury (UK)


"BorisS" wrote in message
...
How can I get VBA to figure out what is in position 1 or 2 or whatever of
the
rows in a table? In other words, when I am recording a macro and, for
example, dragging out a row field, the recording takes the actual name of
that field and makes it invisible. But if I am in a situation where a
user
is going to be manipulating this and I want Excel to automatically take
out,
say, the second grouping of a table, without my knowing ahead of time what
that second grouping will be at the time the macro is run, then how do I
tell
it "drag out whatever field is in position 2"?

Thx.
--
Boris



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
How do I remove a Calculated Field from the Pivot Table field list TheTraveler Excel Discussion (Misc queries) 2 April 9th 10 06:55 PM
Pivot Field in Field List but Not Source Data AP[_2_] Excel Discussion (Misc queries) 0 November 1st 07 04:06 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
Unable to change field settings in calculated field in a pivot tab Mike Excel Discussion (Misc queries) 0 September 25th 06 07:45 PM
pivot row field definition in VBA BorisS Excel Programming 2 June 15th 05 09:07 PM


All times are GMT +1. The time now is 07:31 AM.

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"