Unable to Hide Full Screen Toolbar Through a Procedure (152821)



The information in this article applies to:

  • Microsoft Excel for Windows 95 7.0a

This article was previously published under Q152821

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. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to 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 requirements. 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


Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbcode kbfix kbProgramming KB152821