Datasheet
CAUTION
This method is by no means a foolproof way to prevent users from accessing parts of a
workbook. Nothing can prevent a savvy user from using the Properties window to delete
the contents of the ScrollArea field. Or, when the workbook is open, the user can choose
to disable macros for the workbook. Another way to bypass the Workbook_Open macro
is to press Shift while the file opens.
Using Worksheet Protection
The second method of limiting the usable area of a worksheet relies on unlocking cells and
protecting the workbook:
1. Select all cells that you want to be accessible. They can be single cells or any number of
ranges.
2. Press Ctrl+1 to display the Format Cells dialog box.
3. In the Format Cells dialog box, click the Protection tab and remove the check mark from
the Locked check box.
4. Choose Review ➪ Protect Sheet to display the Protect Sheet dialog box.
5. In the Protect Sheet dialog box, remove the check mark from the Select Locked Cells
check box (see Figure 22-3).
Figure 22-3: Use the Protect Sheet dialog box to prevent the user from selecting
locked cells.
6. If desired, specify a password that will be required in order to unprotect the sheet, and
then click OK.
Tip 22: Limiting the Usable Area in a Worksheet
58
04_137666 ch01.qxp 5/22/07 7:31 PM Page 58