Protected Worksheet Permissions

P

pearsons_11114

In 2003, how do you detect what permissions are allowed on a protected
worksheet? The goal is to programmatically unprotect the worksheet, make
changes, and then reprotect with the same permissions. But there doesn't seem
to be any to detect that.
 
D

Dave Peterson

When you reprotect the worksheet, what permissions are changed from when it was
protected?
 
P

pearsons_11114

The permission are set to their defaults, rather than what they were set to.
 
D

Dave Peterson

You'll have to look at each one individually (or at least the ones you're
interested in):

dim wks as worksheet
dim myAllowInsertingColumns as boolean
set wks = activesheet
myinsertingcolumns = wks.Protection.AllowInsertingColumns
.....
wks.protect allowinsertingcolumns:=myallowinsertingcolumns
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top