ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protected Worksheet Permissions (https://www.excelbanter.com/excel-programming/425494-protected-worksheet-permissions.html)

pearsons_11114

Protected Worksheet Permissions
 
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.

Dave Peterson

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

pearsons_11114 wrote:

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.


--

Dave Peterson

pearsons_11114

Protected Worksheet Permissions
 
The permission are set to their defaults, rather than what they were set to.

"Dave Peterson" wrote:

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

pearsons_11114 wrote:

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.


--

Dave Peterson


Dave Peterson

Protected Worksheet Permissions
 
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



pearsons_11114 wrote:

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

"Dave Peterson" wrote:

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

pearsons_11114 wrote:

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.


--

Dave Peterson


--

Dave Peterson

pearsons_11114

Protected Worksheet Permissions
 
Bingo, just couldn't find it. "See Also" section is useless. Thanks!




All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com