Activate full-screen feature and disable window resize button of an Excel workbook using VBA in Microsoft Excel.

In this article we will learn how to activate full-screen feature and disable window resize button using VBA.


Logic explanation

We have created “ActivatingFullScreen” macro to change the property of Excel application to enable the full-screen feature.

We have used window resize event of the workbook to disable the window resize button.


Code explanation

Application.DisplayFullScreen = True

We have set DisplayFullScreen property of the application to True to enable full-screen feature.

Wn.WindowState = xlMaximized

We have set WindowState property of the Excel window to xlMaximized to prevent window from returning to normal size.


Please follow below for the code

Option Explicit

Sub ActivatingFullScreen()

'Activating full screen
Application.DisplayFullScreen = True

End Sub

'Enter below code in ThisWorkbook module
Private Sub Workbook_WindowResize(ByVal Wn As Window)

'Changing window state to maximum size
Wn.WindowState = xlMaximized

Application.DisplayFullScreen = True

End Sub


If you liked this blog, share it with your friends on Facebook. Also, you can follow us on Twitter and Facebook.

We would love to hear from you, do let us know how we can improve our work and make it better for you. Write to us at


  1. Hello! I am making a data entry form which I want to remove the "excel" look. The methods posted here works well, but the" restore down button" also restores the ribbon. Any ideas how to stop this?

    • Hi KPW,

      We have worked on your requirement, and have included below VBA code for you.

      Private Sub Workbook_WindowResize(ByVal Wn As Window)
          Wn.WindowState = xlMaximized
          EnableResize = False
          Application.DisplayFullScreen = True
          Application.CommandBars("Full Screen").Enabled = False
      End Sub

      To apply code, follow below steps..

      1. Open any excel file
      2. Press ALT + F11
      3. Click on "ThisWorkbook" module in the VBA project and past the above code.

      Please do let us know if you face any problem.

      Happy Learning!
      Site Admin

      P.S. Login at to get instant solution for your simple and complicated queries.

  2. Unfortunately if the Windows Toolbar is set to always be on top, which it usually is, part of the excel spreadsheet is obscured. Does anyone have a solution to this problem?

    • Harry Flashman

      By Windows Toolbar are you referring to the task bar? If so put it at the bottom where it normally goes. I use the technique suggested in this post, myself to give my dashboards a non-Excel look.

      You need to put vba in the Workbook module however to change the settings both when you close the workbook, and when you switch focus to another workbook.

      For example:
      Private Sub Workbook_Deactivate()
      'Macro Purpose: Restores users prior scroll bar settings

      With ActiveWindow
      .DisplayHorizontalScrollBar = True
      .DisplayVerticalScrollBar = True
      End With

      Application.DisplayFullScreen = False
      Application.CommandBars("Full Screen").Visible = True
      Application.DisplayFormulaBar = True

      End Sub

  3. This code exceed expectations, but the only problem is that is will change the view of the file menu for all other documents because it doesn't unload.

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.