Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
protect formulas
Hi. Time for my daily question :) Thanks so much
everyone for helping me out on my other posts. I am working to protect the formulas in my worksheet. If possible, I want to be able to select cells with formulas but not change them. I think its possible. (using excel xp). This macro below tells me I don't have a variable defined in the fourth line "for each c In Active...." Any ideas? Thanks, Todd. Sub ProtectFormula() Dim Sh As Worksheet Application.ScreenUpdating = False For Each c In ActiveSheet.Cells 'in all worksheet If c.Formula Like "=*" Then c.Select Selection.Locked = bLock Selection.FormulaHidden = bLock End If Next c End Sub End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
protect formulas
Todd,
Just set the Protection property of the cell to Locked and protect the worksheet. I think XP has another way to protect cells, check it out. Than password protect the worksheet. But keep in mind that Excel protection is easy to break... As for "c" - add Dim c as Range to your code. -- sb "Todd" <tunatl@hotmail wrote in message ... Hi. Time for my daily question :) Thanks so much everyone for helping me out on my other posts. I am working to protect the formulas in my worksheet. If possible, I want to be able to select cells with formulas but not change them. I think its possible. (using excel xp). This macro below tells me I don't have a variable defined in the fourth line "for each c In Active...." Any ideas? Thanks, Todd. Sub ProtectFormula() Dim Sh As Worksheet Application.ScreenUpdating = False For Each c In ActiveSheet.Cells 'in all worksheet If c.Formula Like "=*" Then c.Select Selection.Locked = bLock Selection.FormulaHidden = bLock End If Next c End Sub End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect formulas during sort | Excel Discussion (Misc queries) | |||
Protect my formulas! | Excel Worksheet Functions | |||
Protect Formulas | Excel Worksheet Functions | |||
how to protect formulas in a cell | Excel Discussion (Misc queries) | |||
protect a single row of formulas | Excel Discussion (Misc queries) |