BALLYMOUNT
IS-IT--Management
I've got a two sheet workbook.
Sheet 1 has a PivotTable linked to a database.
Sheet 2 is blank.
I programatically move through the pivottable drop-down filter which cause the pivottable to recalculate. I then copy and paste those values to sheet 1. I then move onto the next value in the pivot filter and this recalulates the pivot and then I copy/paste (add) to sheet 1 to keep track of cummulative figures. (all this is done in vb/macro)
The problem is that the loop that sets the filter value in the pivottable moves to the next value before the pivottable has finished recalculating. therfore the values I copy/paste may be wrong due to this delay.
Is there a way to ensure pivot-table has finished calculating data before cotinuing on in my loop.
Thanks.
Sheet 1 has a PivotTable linked to a database.
Sheet 2 is blank.
I programatically move through the pivottable drop-down filter which cause the pivottable to recalculate. I then copy and paste those values to sheet 1. I then move onto the next value in the pivot filter and this recalulates the pivot and then I copy/paste (add) to sheet 1 to keep track of cummulative figures. (all this is done in vb/macro)
The problem is that the loop that sets the filter value in the pivottable moves to the next value before the pivottable has finished recalculating. therfore the values I copy/paste may be wrong due to this delay.
Is there a way to ensure pivot-table has finished calculating data before cotinuing on in my loop.
Thanks.