VBA to do full screen, no headings, no formula bar etc etc

manc

Active Member
Joined
Feb 26, 2010
Messages
340
Good morning Demigods,

I am after a short bit of vba to do the following,



a) on open, the workbork is displayed full screen, no formula bar, no headings, no gridlines, no sheet tabs

I will also have a button, where above code would be assigned to, and user could toggle between full screen and normal view.




Thanks for your viewing and digestion time taken reading this post. Any help/ideas muchly appreciated.

Regards
manc
 
Hi,

Found this thread and it's doing exactly what I needed it to do, however, I'm unable to edit cells when everything is hidden. I've checked for basic things liked locked cells and protected sheets and it's not resolved the issue. Any ideas would be much appreciated, thanks.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
try this code and put in thisworkbook module

Private Sub Workbook_Activate()
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = False
Application.ScreenUpdating = True
End Sub


Private Sub Workbook_Deactivate()
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
Application.ScreenUpdating = True
End Sub
Hi, I tried this code and it worked. However, when I close the workbook, and reopen it, it automatically saved the workbook with the information in it, instead of asking me if I want to save it before closing the workbook.

Does anyone know how to change that one aspect? Make it throw the Save As box instead of saving over the original workbook "template".
 
Upvote 0
try this code and put in thisworkbook module

Private Sub Workbook_Activate()
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = False
Application.ScreenUpdating = True
End Sub


Private Sub Workbook_Deactivate()
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
Application.ScreenUpdating = True
End Sub
Thanks for the above! I amended it to keep the tabs visible while in full screen mode. But ESC doesn't work for me to deactivate fullscreen mode. Is there some other code I need to put in? Thanks in advance for your assistance.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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