IsCalculated Property Example

This example disables the PivotTable Field dialog box if the specified PivotTable report contains any calculated fields.

set pt = Worksheets(1).PivotTables("Pivot1")
For Each fld in pt.PivotFields
    If fld.IsCalculated Then pt.EnableFieldDialog = False
Next