In this article we will learn how to activate full-screen feature and disable window resize button using VBA.
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.
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
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 firstname.lastname@example.org
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.