owentmoore
Technical User
Hi all,
I need a pivot table to display data depending on the value in a cell.
I am using a variable as follows:
Public MyWeekNum as Variant
MyWeekNum = cells(2,3).value
Then through a macro I call the following:
Sub WeekNum()
ActiveSheet.PivotTables("PivotTable4").PivotFields("Owner").CurrentPage = _
WeekNum
End Sub
My two questions are:
1) Am I setting the value of the variable correctly?
2) Am I calling the variable correctly in the macro?
Thanks a lot
Owen
I need a pivot table to display data depending on the value in a cell.
I am using a variable as follows:
Public MyWeekNum as Variant
MyWeekNum = cells(2,3).value
Then through a macro I call the following:
Sub WeekNum()
ActiveSheet.PivotTables("PivotTable4").PivotFields("Owner").CurrentPage = _
WeekNum
End Sub
My two questions are:
1) Am I setting the value of the variable correctly?
2) Am I calling the variable correctly in the macro?
Thanks a lot
Owen