Protecting a worksheet / workbook with macros
Unprotect the worksheet, run your code and then reprotect the worksheet:
With ActiveSheet
.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True, Password:="Password"
.EnableSelection = xlUnlockedCells
End With
"Your current macro code here
ActiveSheet.Unprotect Password:="Password"
--
Kevin Backmann
"WLMPilot" wrote:
I have setup spreadsheets (within one workbook) that lets you enter info in
the computer to assist in balancing your checkbook instead of having to
manually write down the uncleared transactions and then calculate.
The problem is this: I have macros in this workbook and I am trying to
protect the worksheet / workbook. However, when I protect it, the macros do
not work. As soon as I unprotect it, the macros work.
Any suggestions?
Thanks,
Les
|