Hi,

I realy need some help. I am new to the forum so hopefully I am providing this information in the right way.

I have some VBA code which I found through good old google which is driving me round the bend.

The code is written so that the user can press a button, the macro runs and prompts the user to input a number which relates to the number of weeks they have selected the report to present data for. The macro then deletes existing calculated fields in the pivot and then adds in the calculated fields again with the new number of weeks in the formula. The problem is that in the delete process it deletes all calculated fields in all the sheets in the workbook. As my graphs read off dynamic ranges this is causing errors elsewhere. I have tinkered and tinkered. Please can someone help.

Code below including 'greened out bits which I was tinkering with.

Thanks in advance for your help.

Sandra

Please Login or Register  to view this content.