VBA - Application display full screen

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,501
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

When I use the below code it does display full screen like the screen shot # 1 whereas, I want it to display as screen shot # 2 like showing the option bar

VBA Code:
Sub fullscreen()
Application.DisplayFullScreen = True
End Sub

Screen Shot # 1
1644156264557.png



Screen Shot # 2

1644156284451.png
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Use this instead

VBA Code:
Application.WindowState = xlMaximized
 
Upvote 0
Hi to all.
This should be what you are asking for:
Application.CommandBars.ExecuteMso "MinimizeRibbon"
Same to restore.
 
Upvote 0
Solution
Hello Friends,

I Started this thread few months back & also found the solution here

Running this code works fine & full screen is on
VBA Code:
Application.CommandBars.ExecuteMso "MinimizeRibbon"

Is there a way to detect if the full screen is on or of ???

Regards,

Humayun
 
Upvote 0
In a test file run this from a sheet and you will realize what you need in your project.
VBA Code:
Option Explicit
Sub fullscreen()
    Application.DisplayFullScreen = True
    If Application.DisplayFullScreen = True Then MsgBox "Full screen"
    Application.DisplayFullScreen = False
    If Application.DisplayFullScreen = False Then MsgBox "Normal screen"
End Sub
 
Upvote 0
In a test file run this from a sheet and you will realize what you need in your project.
VBA Code:
Option Explicit
Sub fullscreen()
    Application.DisplayFullScreen = True
    If Application.DisplayFullScreen = True Then MsgBox "Full screen"
    Application.DisplayFullScreen = False
    If Application.DisplayFullScreen = False Then MsgBox "Normal screen"
End Sub

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top