Please help! I have spent way too much time trying to figure this out, so I'm really hoping someone can help.
I have recorded vb that changes a page item in a pivot table when selecting from a combo box - similar to this video. http://www.datapigtechnologies.com/f...s/pivot10.html. The recorded code that vb gives me works only if it's selecting the selection that was chosen when recorded or if it was manually selected right before I choose the drop down item. Otherwise, it gives an invalid procedure call or arguement - runtime error 5. This occurs in 2007 or compatibility mode. I think this is a new problem since it used to work okay for me. I don't understand b/c this is what was recorded, and also is the same as in this video. Does anyone know what's going on??
Some of my attempts at code:
Sub SelectPer2()
'
' SelectPer2 Macro
'
'
ActiveSheet.PivotTables("PivotTable6").PivotFields("Period").CurrentPage = Range("Start!d9")
End Sub
Sub Macro10()
'
' Macro10 Macro
'
'Sheets("Rept Sch piv").Select
ActiveSheet.PivotTables("PivotTable6").PivotFields("Period").CurrentPage = Range("Start!d9")
End Sub
Sub Macro11()
'
' Macro11 Macro
'
'
Sheets("Rept Sch piv").Select
ActiveSheet.PivotTables("PivotTable6").PivotFields("Period").CurrentPage = Range("a1")
ActiveSheet.PivotTables("PivotTable9").PivotFields("Quarter").CurrentPage = _
"Q4"
End Sub