View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Parent Mark Parent is offline
external usenet poster
 
Posts: 14
Default Using VB to change a defined formula within a pivottable

I have a pivottable and several formula defined, which is working well
enough, but I'd like to change a formula based on a selection within the
pivottable. My problem is the coding to change the formula. I'm using

Worksheets("RESL Cashflow").PivotTables("1MainRESLCashflow"). _
PivotFormulas("RESLRetention").StandardFormula =
"=RESLOpening$^12"

where "RESL Cashflow" is the name of the sheet, "1MainRESLCashflow" is the
name of the pivottable, and "RESLRetention" is the name of the calculated
field. Am I using the wrong Method?