This is my first post on the forum so greetings
Sadly I come with a puzzle:
I have a Pivot table with 3 fields in the Reports Filter. These filters are determined in cells B1, B2 and B3. B2 & B3 are strings and B1 is a date value.
If I select (manually) from any field filter list or type a value in (providing its within the data); it updates the pivot table data correctly.
Now within VBA; I can change the string filtered cells B2 & B3 without issue but struggle with B1.
I want to select a date:
Dim oDate as Date
oDate = "08/06/2011"
Worksheets("PT - Pops").Range("B1").Value = oDate
When I run the VBA; I get an excel error:
"No item of this name exists in the PivotTable report. Rename '09/06/2011' to '40702'
I've tried changing oDate to string/variant but still get the same error message.
Any ideas what I'm doing wrong here?
Sadly I come with a puzzle:
I have a Pivot table with 3 fields in the Reports Filter. These filters are determined in cells B1, B2 and B3. B2 & B3 are strings and B1 is a date value.
If I select (manually) from any field filter list or type a value in (providing its within the data); it updates the pivot table data correctly.
Now within VBA; I can change the string filtered cells B2 & B3 without issue but struggle with B1.
I want to select a date:
Dim oDate as Date
oDate = "08/06/2011"
Worksheets("PT - Pops").Range("B1").Value = oDate
When I run the VBA; I get an excel error:
"No item of this name exists in the PivotTable report. Rename '09/06/2011' to '40702'
I've tried changing oDate to string/variant but still get the same error message.
Any ideas what I'm doing wrong here?