Suppressing Pivot Table Toolbar


Posted by Bill on January 04, 2001 11:51 AM

I have a pivot table toolbar which will not go away during macro execution. When the macro starts, I am on a menu sheet. The macro sets ScreenUpdating to False, selects the 2nd sheet, creates a pivot table, copies some numbers to a 3rd sheet, deletes the pivot table from the 2nd sheet, activates the menu sheet, activates screen updating, displays a msgbox.

Although I only see the menu sheet, a grey box the size of the pivot table toolbar appears during macro execution. When my MsgBox pops up, the grey box turns into the Pivot Table toolbar. When I click OK to dismiss the MsgBox, the toolbar disappears.

This is Excel 2000 in Windows 98. I also tried adding Application.CommandBars("PivotTable").Visible = False, and this did not help.

While writing the code, a similar problem would happen: The pivot table toolbar would follow me into the VBA editor. I would click the x to close it so I could see my code, which would take me back to the worksheet with the pivot table.

Bill



Posted by Dave on January 04, 2001 4:57 PM

Hi Bill

I would guess this is related to your ScreenUpdating=False. Set this back to true in your code somewhere before it finishes.

Dave
OzGrid Business Applications