You are here LEARN EXCEL & VBA Excel Tips Excel General Preventing Movement in Protected Areas in Microsoft Excel

Preventing Movement in Protected Areas in Microsoft Excel

You can divide the area of a sheet containing data into two parts: an area where movement is unrestricted (scroll area) and an area where movement is restricted, meaning that it is protected.

You can set the scroll area in a sheet either by using the Scroll Area macro or by making a change in the sheet's Properties dialog box.

Changing properties in the Properties dialog box
To change the sheet's properties, you need to open the macro editor, VBE.

  1. Press Alt+F11.
  2. Under VBA Project, select the sheet for which you want to change the Scroll Area property (You may need to hit Ctrl+R to display VBA Project).
  3. Under Properties, select the Scroll Area cell (see the screen shot), and type the reference of the range you want to set as the scroll area. In the screen shot, note that the reference given is $A$1:$C$15.
  4. To close the VBE or return to Excel, press Alt+Q.
The result: in the range A1:C15, you can perform any action in the cells. In all the other cells in the sheet, you are restricted to viewing the cells and cannot move or scroll between them. Screenshot // Preventing Movement in Protected Areas in Microsoft Excel
Preventing Movement in Protected Areas in Microsoft Excel