Pivot Table VBA

G

Guest

with ActiveSheet.PivotTables("PivotTable").PivotFields("sls_no")
.Orientation = xlRowField
.Position = 1

I am trying to figure out what code should be used to drag from the field
list into the pivot table. The code above does not work. Does anyone know the
correct code?

Thank you.
 
D

Debra Dalgleish

You could turn on the macro recorder as you manually drag the field into
the pivot table. Then, use the code that was created.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top