Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The Add-Ins tab disappears if it is active when you try to print a workbook from the print preview in Excel 2007


View products that this article applies to.

Symptoms

If you try to print a workbook from the print preview when the Add-Ins tab is active in Microsoft Office Excel 2007, the Add-Ins tab disappears.

Note If you exit Excel 2007 and then restart Excel 2007, the Add-Ins tab reappears.

↑ Back to the top


Workaround

To work around this problem, click a tab other than the Add-Ins tab to make the other tab active before you print the workbook from the print preview.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

Steps to reproduce the problem

  1. Start Excel 2007.
  2. Create a new workbook.
  3. On the Developer tab, click Visual Basic in the Code group to start the Microsoft Visual Basic Editor (VBE).
  4. Add the following code to the ThisWorkbook module.
    Private Sub Workbook_Open()
     
        Dim sheetbar As Office.CommandBar 
        Dim menubar As Office.CommandBarControl 
        Dim dlitem As Office.CommandBarControl 
        Dim cmdbutton As Office.CommandBarButton 
        Dim cnt As Integer
     
        On Error Resume Next 
         
        Set sheetbar = Application.CommandBars("worksheet menu bar") 
        Set menubar = sheetbar.Controls("PI") 
        If menubar Is Nothing Then 
            Set menubar = sheetbar.Controls.Add(msoControlPopup, temporary:=True, before:=10) 
            menubar.Caption = "&PI" 
        End If
     
    End Sub
    
    
    
  5. On the File menu, click Save.
  6. In the Save As dialog box, type myadd-in in the File name box, click Excel Add-In or Excel 97-2003 Add-In in the Save as type list, and then click Save.
  7. Exit Excel 2007.
  8. Restart Excel 2007.
  9. Create a new workbook.
  10. Click the Microsoft Office Button, and then click Excel Options.
  11. Click Add-Ins.

    Notice that myadd-in is listed in the Inactive Application Add-ins section in the Add-ins list.
  12. Click Excel Add-ins in the Manage list, and then click Go.
  13. In the Add-Ins dialog box, click to select the myadd-in check box, and then click OK.

    Notice that the Add-Ins tab appears in Excel 2007.
  14. In the Excel workbook, add any data.
  15. Click the Add-Ins tab to make the tab active.
  16. Click the Microsoft Office Button, point to Print, and then click Print Preview.
  17. On the Print Preview tab, click Print in the Print group.

    Notice that when the Print dialog box appears, the Add-Ins tab in the workbook disappears.

↑ Back to the top


Keywords: KB933787, kbprb, kbtshoot, kbexpertisebeginner

↑ Back to the top

Article Info
Article ID : 933787
Revision : 1
Created on : 3/12/2007
Published on : 3/12/2007
Exists online : False
Views : 246