How to protect an Excel sheet with VBA Macro Code

Excel worksheet protection is weak and can be easily bypassed with free software.An extra layer or alternative is to use Excel VBA code to protect the sheet.This can be done using a event macros.Place this code into the worksheet''s corresponding macro sheet.Any changes the user makes will be automatically reversed.

Dim dtvalPrivate Sub Worksheet_Change(ByVal Target As Range)If Target.Formula <> dtval Then Target.Formula = dtvalEnd Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)dtval = Target.FormulaEnd Sub

', '
"Yes, Excel can do that!"
© 2000-2014 All rights reserved.