by Allen Wyatt
(last updated January 21, 2017)
Chris notes that Excel supports both Normal and Page Layout views. He wonders if there is a way to disable Page Layout view so the user of a workbook cannot select it.
Excel makes these two views (Normal and Page Layout) available from the View tab of the ribbon. One might think that the solution is to simply modify the user interface so that the Page Layout tool is no longer available on the ribbon. This, unfortunately, is easier said than done.
If you are using Excel 2007, the user interface is notoriously hard to change. It requires writing XML code and making sure that the code is executed every time the workbook is opened. If you like notoriously hard things, you can find a bit about how to start at this page:
If you are using Excel 2010 or a later version, then modifying the user interface is a bit easier. You can do it by following these steps:
Figure 1. The Excel Options dialog box.
That's it. Now, if you go look at the View tab, you'll notice that the user can no longer switch to Page Layout view. In fact, the user cannot pick any view other than whatever view you happen to be in at the current time. This change affects only the current machine, for all workbooks, and cannot be tied to any particular workbook. (The reason is that while you can modify the ribbons a bit in Excel 2010, you cannot modify them in macros. It's a big pain and you need to go back to writing XML code like in Excel 2007.)
Perhaps a better solution is to create a small macro that will make sure that the worksheet is always being displayed in Normal view. This is easy to do; just right-click on a worksheet tab and choose View Code from the resulting Context menu. In the code window, enter the following:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveWindow.View = xlNormalView End Sub
This code causes Excel to switch to Normal view every time someone changes what is selected on the screen. Someone could use the tools on the View tab of the ribbon to switch to Page Layout view, but as soon as they select a different cell the macro kicks in and switches back to Normal view.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12139) applies to Microsoft Excel 2007, 2010, 2013, and 2016.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Excel can check the data and formulas in your worksheet to see if it detects any errors. The rules used for this checking ...Discover More
Don't want to always type the decimal point as you enter information in a worksheet? If you are entering information that ...Discover More
Excel allows you to make a wide range of customizations to both the Quick Access Toolbar and the ribbon. If you want to ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.