XL: Unable to Hide Full Screen Toolbar Through a Procedure

Last reviewed: February 3, 1998
Article ID: Q152821
The information in this article applies to:
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SYMPTOMS

In the versions of Microsoft Excel listed above, the Full Screen toolbar may stay visible in Full Screen mode, even though you are correctly using macro code to hide it.

CAUSE

This usually happens if Microsoft Excel is switched to full screen display through Microsoft Excel macro code and an attempt to hide the Full Screen toolbar occurs in the same macro. Any change to the Full Screen toolbar visibility state during a macro that switches full screen state may not work.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/support/supportnet/refguide/default.asp

Use the OnTime method to call a second procedure that will set the visible property of the Full Screen toolbar to FALSE. The following example shows you how to create such a procedure.

To Run the Macro

  1. On the Insert menu, point to Macro, and then click Module.

  2. In the new module, enter the following:

          ' This macro is the main macro to run that will switch to full screen
          ' and will, in return, run the next procedure to hide the Full Screen
          ' toolbar.
    
          Sub Full_Screen()
              ' Set Microsoft Excel to Full Screen Display.
              Application.DisplayFullScreen=True
              ' Immediately run the macro, Set_Toolbar.
              Application.OnTime Now, "Set_Toolbar"
          End Sub
    
          ' This macro should not be run directly, but will be run from the
          ' above procedure to hide the Full Screen toolbar while in Full 
          ' Screen display mode.
          Sub Set_Toolbar()
              ' Hide the Full Screen toolbar.
              Toolbars("Full Screen").Visible = False
          End Sub
    
    

  3. On the Tools menu, click Macro.

  4. In the Macro dialog box, click Full_Screen i the list of Macro names, and then click Run.

The Full_Screen macro will set the display of Microsoft Excel to Full Screen mode and will, in return, run the procedure, Set_Toolbar, to hide the Full Screen toolbar.

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. This problem was corrected in Microsoft Excel 97 for Windows and Microsoft Excel 98 Macintosh Edition.

MORE INFORMATION

Full-screen mode maximizes the application window to cover the entire screen and hides the application title bar (in Microsoft Windows). Toolbars, the status bar, and the formula bar maintain separate display settings for full-screen and normal mode. You can set or return the Full Screen status by using the Visual Basic for Applications property, DisplayFullScreen. The DisplayFullScreen property equals True if Microsoft Excel is in full-screen mode.

The Visible property for the Toolbar object will allow you to set or return the visibility of any Microsoft Excel toolbar. If the toolbar is visible the visible property is TRUE; if the toolbar is not visible the visible property is FALSE.

REFERENCES

For more information about the Visible property in Microsoft Excel version 7.0, click Answer Wizard on the Help menu and type:

   Visible

For more information about DisplayFullScreen in Microsoft Excel version 7.0, click Answer Wizard on the Help menu and type:

   DisplayFullScreen

For more information about DisplayFullScreen in Microsoft Excel version 5.0, choose the Search button in Visual Basic Reference Help and type:

   DisplayFullScreen Property

For more information about the Visible Property in Microsoft Excel version 5.0, choose the Search button in Visual Basic Reference Help and type:

   Visible Property


Additional query words: 5.00 5.00a 5.00c 7.00 7.00a XL7 XL5
Keywords : kbcode kbprg PgmOthr
Version : WINDOWS:5.0,5.0c,7.0; MACINTOSH:5.0,5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbbug
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.