Excel Help DotXLS Excel Help
www.DotXLS.com
"Yes, Excel can do that!"

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

', '





Subscribe

Main (RSS)

excel-security-and-password-protection (RSS)

© 2000-2009 Dotxls.com