Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot Table macro translation

Status
Not open for further replies.

glamb

Programmer
Dec 29, 2009
32
0
0
US
OK, I'm stuck again. Have been searching all over the internet and can't figure this one out.

With ActiveSheet.PivotTables("PivotTable1")
.InGridDropZones = True
.RowAxisLayout xlTabularRow
End With

Apparently, the second line has to do with Microsoft.Office.Interop.Excel, so I don't know if it can be translated.
I just want to make a classic style pivot table. Again, any help appreciated.
 
From Excel's Help, it looks like RowAxisLayout is a method, so you need to pass the appropriate parameter. xlTabularRow is a constant with a value of 1. Putting that together, looks like you need:

Code:
With ActiveSheet.PivotTables("PivotTable1")
        .InGridDropZones = .T.
        .RowAxisLayout(1)
EndWith

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top