I got this code (from somewhere, maybe here) that returns the items selected on a pivot filter.
UDF works fine, it recalculates when I change the filter and when I refresh the pivot BUT I also have a macro initiated by a button that refreshes the pivot (pivot is somewhat hidden, that is why I need the button). The macro is simply:
SO, when I refresh the pivot via the button i get a #Value! error. If I reculc (full or F2 enter on one of the cells containing the UDF) it works fine again.
Can anyone please explain, resolve?
Bookmarks