Bulletproofing an application

A user can easily destroy a worksheet. Erasing one critical formula or value often causes errors that ripple through the entire worksheet — and perhaps in other dependent worksheets. Even worse, if the user saves the damaged workbook, the corrupt version replaces the good copy on disk. Unless the person using your application has a backup procedure in place, the user could be in trouble — and you'll probably be blamed!

Add some protection if other users, especially novices, use your worksheets. Excel provides several techniques for protecting worksheets and parts of worksheets. Table 1 reveals how you can do some of these things.

Table 1

Protecting Users

What to Do

How to Do It

Lock specific cells (using the

Doing so takes effect only when you

Protection tab in the Format Cells

protect the document with the ToolsO

dialog box) so that they can't be

ProtectionOProtect Sheet command.

changed.

Protect an entire workbook:

This takes effect when you use the ToolsO

the workbook structure, the

ProtectionOProtect Workbook command.

window position and size,

or all three.

Hide the formulas in specific

This takes effect only when you protect

cells (using the Protection tab

the document with the ToolsOProtectionO

in the Format Cells dialog box)

Protect Sheet command.

so other users can't see them.

Lock objects on the worksheet

This takes effect only when you protect

(using the Protection tab in the

the document with the ToolsOProtectionO

Format Object dialog box).

Protect Sheet command.

Hide rows.

This helps prevent the worksheet from

looking cluttered and provides some

protection against prying eyes. FormatO

RowOHide

Hide columns.

This helps prevent the worksheet from

looking cluttered and provides some pro

tection against prying eyes. FormatO

ColumnOHide

Table 1 (continued)

What to Do

How to Do It

Hide sheets.

This helps prevent the worksheet from

looking cluttered and provides some pro

tection against prying eyes.

FormatOSheetOHide

Hide documents.

This helps prevent the worksheet from

looking cluttered and provides some pro

tection against prying eyes. WindowOHide

Designate workbooks as read-only.

This ensures that they cannot be overwrit

ten with any changes. Choose Save AsO

Options.

Assign a file password.

This prevents unauthorized users from

opening your file. Choose Save AsO

Options.

Using an add-in, which doesn't allow the user to change anything on the add-in's worksheets, is another option.

The appropriate level of protection and how you implement it depend on the application and who will use it.

Excel's protection features are not really secure. In other words, if someone really wants to defeat your protection, they can probably find a way to do it.

0 0

Post a comment