PivtItem.value

Joined
Feb 8, 2007
Messages
1
Reaction score
0
Hi,

All I am trying to do is to pick a cell value on a sheet (Invoice #) and force that value to be dispayed in Pivt Table, Here is how I decided to do it;

Sub Macro1()

Dim P As PivotItem
Dim W As Variant

Sheet4.Select
Range("B5").Select
Range("B5").Value = W
P.Value = P

Sheets("Labour Summary All").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("WO Number")
.PivotItems("P").Visible = True
End With

End Sub


This does not work and goves me error 91 in, P.Value = P line. Can someone please please help me.

Regards
Kirill
 

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