PLEASE HELP! Copy sheet with password protected cells debug error
Hi Bsnapool, Hi Duncan,
I cant remember the words though, something like 'UserInputOnly' or
something like that
With reference to Duncan's latter suggestion, setting the Protect method's
UserInterfaceOnly parameter to true enables vba manipulation of the
protected sheet.
However, this setting is not persistent and needs to be reset each time the
workbook is opened.
Perhaps, therefore, protection could be set in the Workbook_Open or
Auto_Open procedures, e.g.:
'===========
Sub Auto_Open()
With Worksheets("Sheet1")
.Protect Password:="drowssap", UserInterfaceOnly:=True
End With
End Sub
'<<===========
---
Regards,
Norman
"Duncan" wrote in message
ups.com...
Hi,
If the error occurs because the cells are protected, can you not
unprotect with your code and then reprotect again by code afterwards?
activeworkbook.unprotect
activeworkbook.protect
look in the help as there are other parameters you can set to the
protection.
Or: you can protect via macro on startup and state user only so that
the macro is not affected by the protection, the protection will only
work at sheet level (typing into cells etc) and will not stop a macro
from changing cells thus solving the error
I cant remember the words though, something like 'UserInputOnly' or
something like that...
Duncan
|