Use the UserInterfaceOnly flag of the Protect method. This
prevents the user from modifying the sheet, but allows VBA to do
anything. This property is not saved with the workbook, so you
should protect the sheet(s) in the Workbook_Open event. E.g.,
Private Sub Workbook_Open()
Worksheets("Sheet1").Protect Password:="abc",
userinterfaceonly:=True
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Eithne R" wrote in message
...
I want to password protect a spreadsheet / sheets but need to be
able to
unprotect them to manipulate them via a macro. Is this
possible? The
password option does not appear to be available in the protect
method. Cheers