Share this Page URL

Chapter 11. Analyzing Data with PivotTab... > Showing PivotTables and PivotCharts ... - Pg. 406

Analyzing Data with PivotTables and PivotCharts 406 7. Right-click the command button at the bottom of the form's Detail section, and then click Build Event. Here's the code that is used in the command button's Click event: Private Sub cmdPivotToggle_Click() If Me.ProductsByCountry_PivotTable.SourceObject = _ "ProductsByCountry_PivotTable" Then Me.ProductsByCountry_PivotTable.SourceObject = _ "ProductsByCountry_PivotChart"