Can I make just one excel document full screen?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,210
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,

I have a document that works great and has a macro that makes it full screen. (See Below)

however I found on opening other Excel documents the Full screen comands below stayed, so I've been switching full screen off when the Document closes (see below)

My problem is this.
If I run the full screen macro, then close the document without switching it off, when I reopen it it opens exactly as i want even when macros are disabled.
But turning it off means when it opens without macros it looks wrong (not full screen etc.)

Is there a way i can say on all other workbook don't do this?

any ideas would help as i'm flexible on how i deal with this?
Thanks

Tony

my codes:

Code:
Sub Full_SCreen()
Application.DisplayFullScreen = True

Application.DisplayFormulaBar = False
Application.ActiveWindow.DisplayWorkbookTabs = False
Application.ActiveWindow.DisplayHeadings = False
Application.ActiveWindow.DisplayGridlines = False

End Sub
 
Sub Full_Screen_Exit()
Application.DisplayFullScreen = False

Application.DisplayFormulaBar = True
Application.ActiveWindow.DisplayWorkbookTabs = True
Application.ActiveWindow.DisplayHeadings = True
Application.ActiveWindow.DisplayGridlines = True

End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try putting these in ThisWorkbook module of your workbook

Turn on full screen when workbook is opened
Code:
Private Sub Workbook_Open()
    Call Full_SCreen
End Sub
..off when workbook is closed
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Call Full_Screen_Exit
End Sub
Turn on when workbook is activated
Code:
Private Sub Workbook_Activate()
    Call Full_SCreen
End Sub
...off when workbook deactivated
Code:
Private Sub Workbook_Deactivate()
    Call Full_Screen_Exit
End Sub
 
Upvote 0
Hi Yongle,
Thanks for your suggestions, however maybe I didn't expain it correctly.
the problem I have is that I want the document to always open as full screen, no tabs, no formula bar and no headers.
if I set the document up like this and close it down without deactivating it (my on close commands) then when it opens its exactly as I want it even if macro are disabled. as it opens the same way it closes. however doing this effects every other excel document I open, however I can reset it in another document so everything is switched off and because macro are turned off my document is unaffected at least that's my idea?
so what I trying to do or find out is is it possible to have my document always open in full screen etc, but not change the overall setting of excel?
I thing I might be walking up an impossible road but I thought id ask?
Thanks
Tony
 
Upvote 0
I would still use the same approach although you may want to expand on it if there are other "unique" settings to consider in the "one" file.
Use Workbook_Open to create the correct environment for that "one" file and WorkBook_BeforeClose to set everything back to normal.
Then it should always open in its own unique way.

The other thing you could try is to
- save the workbook
- run Full_Screen_Exit to put everything back to normal
- close the file without saving it with
Code:
ThisWorkbook.Close False

If opening that file results in Excel changing some settings, then they require resetting with VBA
 
Last edited:
Upvote 0
Hi Yongle,
the idea to save doc then run "put every back to normal" then close without saving has helped as it lets me keep the tabs, headers etc hidden. but the full screen is still an issue.
i'll keep testing but I think this is a good start so thanks very much :-)
 
Upvote 0
Just wanted to thank you for the code. I assigned hot keys to the code and now I can toggle full screen on / off with a key-press.
 
Upvote 0

Forum statistics

Threads
1,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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