Phelony
07-14-2011, 05:56 AM
Just a quick on, but could someone suggest what this (maddening) problem is?
I'm creating a userform to operate a pivot table, and appear to have written the filter command incorrectly.
With ActiveSheet.PivotTables("PivotTable1").PivotFields(ListBox1)
Listbox1 is the variable, but I can't for the life of me figure out why it's not working, I keep getting "unable to get the PivotFields propert of the PivotTable class" as runtime error (1004). :banghead:
I've tried naming the variable, but keep getting the same issue, I've tried naming the listbox, and that doesn't work either, I've even tried getting the listbox to populate a cell range and then have the cell range populate the variable, but guess what, that doesn't work either...
Any suggestions?
I'm creating a userform to operate a pivot table, and appear to have written the filter command incorrectly.
With ActiveSheet.PivotTables("PivotTable1").PivotFields(ListBox1)
Listbox1 is the variable, but I can't for the life of me figure out why it's not working, I keep getting "unable to get the PivotFields propert of the PivotTable class" as runtime error (1004). :banghead:
I've tried naming the variable, but keep getting the same issue, I've tried naming the listbox, and that doesn't work either, I've even tried getting the listbox to populate a cell range and then have the cell range populate the variable, but guess what, that doesn't work either...
Any suggestions?