• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to always keep excel in Full Screen View

amit6488

New Member
Hi,

I tried looking for different threads but couldn't find the correct code. Basically I am looking for a code that would achieve the following:

1. When specific excel (Test.xlsm) is opened by user, it opens in Full Screen View.
2. Any other workbooks (new/old) opened after or before opening the Test.xlsm is not impacted by this full screen view
3. The view does not reverts to default when Test.xlsm is minimized/resized/toggeled between different applications or other workbooks.

Can anyone please advise if all this can be achieved via VBA code and if yes, can you please share the code with me.

Thanks a lot in Advance :)
Amit
 

Chihiro

Excel Ninja
In Test.xlsm's ThisWorkbook module. Add following.
Code:
Private Sub Workbook_WindowResize(ByVal Wn As Window)
    ActiveWindow.WindowState = xlMaximized
End Sub
However, you can't really force user to turn on Macro or prevent them from changing it, if they have the will to do so. Excel isn't built for that sort of thing.
 

amit6488

New Member
Hi Chihiro,

Thanks for the quick response. basically what I want to achieve is:

In Excel 2010, under view tab, there is an option "Toggle Full Screen View - view the document in full screen mode". With the help of macro I want the excel to open in this mode and this mode should not change (hitting esc key, minimize or toggle between applications).
 

Attachments

Chihiro

Excel Ninja
Hmm, I believe that's controlled by...
Code:
Application.DisplayFullScreen = True
I'm not sure how it behaves with Excel 2010, as Excel 2010 opens all workbooks that's opened using same Excel instance in same window by default.
And to open new window, you needed separate Excel instance. If I recall.

From Excel 2013 onward, each workbook is opened in separate window, even when opened in same instance (you can't open separate instance without explicit instruction via short cut key, cmd line etc).

See if you can use above and test. As I don't have access to Excel 2010 to test how it behaves.
 

amit6488

New Member
Hi Chihiro,

Thanks for the code and yes you were right. in 2010 all excel open using same excel instance so this wont work for me :-(
I guess I will have to convert my excel data entry sheets and all other tabs into userforms. but that will take some time.

In case you are able to figure out a workaround that can help avoid creating these userforms, that would be really appreciated :)
 

Frncis

Member
I code all my workbooks to open full size. The code is placed in ThisWorkbook, & is actiivated when the workbook opens.
Code:
Private Sub Workbook_Open()
 Application.WindowState = xlMaximized 'maximize Excel
    ActiveWindow.WindowState = xlMaximized 'maximize the workbook in Excel
     Application.ScreenUpdating = True
     end Sub
I hope this helps.
 
Top