D
Dave Peterson
If you protect your sheet in code, you can allow your code to do things that
users can't.
Option Explicit
Sub auto_open()
With Worksheets("Sheet99")
.Protect Password:="Hi", userinterfaceonly:=True
End With
End Sub
It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook. That's why I used auto_open/workbook_open.)
But there are still a few things that won't work as code.
If you run into that, you could always unprotect the worksheet, run your stuff,
and reprotect the worksheet.
(You could always do that second suggestion no matter what.)
enginguven wrote:
users can't.
Option Explicit
Sub auto_open()
With Worksheets("Sheet99")
.Protect Password:="Hi", userinterfaceonly:=True
End With
End Sub
It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook. That's why I used auto_open/workbook_open.)
But there are still a few things that won't work as code.
If you run into that, you could always unprotect the worksheet, run your stuff,
and reprotect the worksheet.
(You could always do that second suggestion no matter what.)
enginguven wrote: