Microsoft KB Archive/933787

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

Article ID: 933787

Article Last Modified on 3/12/2007

-

APPLIES TO


 * Microsoft Office Excel 2007

-



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.



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.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the problem
 Start Excel 2007. Create a new workbook. On the Developer tab, click Visual Basic in the Code group to start the Microsoft Visual Basic Editor (VBE).  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(&quot;worksheet menu bar&quot;) Set menubar = sheetbar.Controls(&quot;PI&quot;) If menubar Is Nothing Then Set menubar = sheetbar.Controls.Add(msoControlPopup, temporary:=True, before:=10) menubar.Caption = &quot;&PI&quot; End If End Sub

 On the File menu, click Save. 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.</li> Exit Excel 2007.</li> Restart Excel 2007.</li> Create a new workbook.</li> Click the Microsoft Office Button, and then click Excel Options.</li> Click Add-Ins.

Notice that myadd-in is listed in the Inactive Application Add-ins section in the Add-ins list.</li> Click Excel Add-ins in the Manage list, and then click Go.</li> 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.</li> In the Excel workbook, add any data.</li> Click the Add-Ins tab to make the tab active.</li> Click the Microsoft Office Button, point to Print, and then click Print Preview.</li> 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.</li></ol>

Additional query words: XL2007

Keywords: kbexpertisebeginner kbtshoot kbprb KB933787

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.