D
DevoGuy
I am un-protecting the worksheet, adding a new column for data. The cells in
the new column are unprotected and I would like to allow for the insertion of
comments after re-protecting the worksheet.
Code 1 (with blank for password) works but Code 2 (with password "PW Code")
causes error in line 5. What is correct syntax for Code 2 Line 5? Any help
would be appreciated. Thanks in advance.
‘Code 1 Leaving Password Blank
1 Sheets("Sheet1").Select
2 ActiveSheet.Unprotect
3 Worksheets("Sheet1").Columns("D
").Select
4 Selection.Insert Shift:=xlToRight
5 ActiveSheet.Protect DrawingObjects:=False
‘Code 2 Using password “PW Codeâ€
1 Sheets("Sheet1").Select
2 ActiveSheet.Unprotect ("PW Code")
3 Worksheets("Sheet1").Columns("D
").Select
4 Selection.Insert Shift:=xlToRight
5 ActiveSheet.Protect ("PW Code") DrawingObjects:=False
the new column are unprotected and I would like to allow for the insertion of
comments after re-protecting the worksheet.
Code 1 (with blank for password) works but Code 2 (with password "PW Code")
causes error in line 5. What is correct syntax for Code 2 Line 5? Any help
would be appreciated. Thanks in advance.
‘Code 1 Leaving Password Blank
1 Sheets("Sheet1").Select
2 ActiveSheet.Unprotect
3 Worksheets("Sheet1").Columns("D
4 Selection.Insert Shift:=xlToRight
5 ActiveSheet.Protect DrawingObjects:=False
‘Code 2 Using password “PW Codeâ€
1 Sheets("Sheet1").Select
2 ActiveSheet.Unprotect ("PW Code")
3 Worksheets("Sheet1").Columns("D
4 Selection.Insert Shift:=xlToRight
5 ActiveSheet.Protect ("PW Code") DrawingObjects:=False