Hi, I've created a script to enumerate critical security groups (Domain
Admins, Enterprise Admins, etc etc) in Active Directory for manager
review on a regular basis. Since this is a control we're putting in
place for SOX compliance, one of the specifications was that the data
in the report be unalterable.
I was able to get protection working but I've got a new feature request
for a editable "comments" column for the managers to use during their
review. I can't seem to get the Sheet.Protection.AllowEditRange.Add
functionality to work.
I get the following error:
Microsoft VBScript runtime error: Object doesn't support this property
or method: 'sheet.Protection.AllowEditRange'
Can anyone help?
Code:
FOR EACH sheet IN myworkbook.sheets
sheet.activate
SET objRange = sheet.columns("F:F")
Sheet.Protection.AllowEditRange.Add objRange
'initially tried the following instead of objRange,
'cc from macro and gives a compilation error
' Title:="Range1", Range:=sheet.Columns("F:F")
'this works by itself but not with any other arguments
Sheet.Protect strmypassword
NEXT