ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a PivotTable with VBA (https://www.excelbanter.com/excel-programming/332622-creating-pivottable-vba.html)

Enrico Campidoglio

Creating a PivotTable with VBA
 
Hi!

I noticed that when creating a PivotTable with the PivotTableWizard method
the PivotTable Command Bar is automatically displayed on the worksheet.
Is there a way to change this behaviour? Or is it necessary to manually hide
the command bar?

Thanks in advance

/Enrico

MIKE215

Creating a PivotTable with VBA
 
Hi Enrico,

try this
Application.screenupdating = false
your code
Application.CommandBars("PivotTable").Visible = False
Application.screenupdating = true

Mike


"Enrico Campidoglio" wrote:

Hi!

I noticed that when creating a PivotTable with the PivotTableWizard method
the PivotTable Command Bar is automatically displayed on the worksheet.
Is there a way to change this behaviour? Or is it necessary to manually hide
the command bar?

Thanks in advance

/Enrico


Enrico Campidoglio

Creating a PivotTable with VBA
 
It made the trick.
Thanks

"MIKE215" wrote:

Hi Enrico,

try this
Application.screenupdating = false
your code
Application.CommandBars("PivotTable").Visible = False
Application.screenupdating = true

Mike


"Enrico Campidoglio" wrote:

Hi!

I noticed that when creating a PivotTable with the PivotTableWizard method
the PivotTable Command Bar is automatically displayed on the worksheet.
Is there a way to change this behaviour? Or is it necessary to manually hide
the command bar?

Thanks in advance

/Enrico



All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com