Pivot Table versus Combo Box

B

bbussoloti

Hello, I have an issue that's killing me and I don't know what to do:
- I've created a Pivot Table that reads data from a Sheet in my Book.
- One of the fields is a Date field, formated Custom to "mmm/yyyy"
- I have 2 Combo Boxes (start and end of period) that are filled according
to my PT date fields, on the Worksheet_Activate procedure:

For Each pvtitem In
PivotTables("PivotTend1").PivotFields("Mês").PivotItems
cbxInicio.AddItem (Format(pvtitem.Name, "mmm/yyyy"))
Next pvtitem

(... and same for the End period ...)

- Although my Dates are only from January-07 to December-08 in my PT, the
Combo Boxes shows me only January-09 to December-09 two times (because I had
it from 07 to 08)!

-Even if I try to use .AddItem.pvtitem.Name, the Combo shows my values
correctly, from 07 to 08, but when I try to use those on some calculation, I
find out that they're still beeing treated as 09 dates!

I don't know what to do to solve that, can someone please help?

Thanks.
 

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