Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting comment in unlocked cell in protected sheet

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: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:D").Select
4 Selection.Insert Shift:=xlToRight
5 ActiveSheet.Protect ("PW Code") DrawingObjects:=False

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting comment in unlocked cell of protected Excel worksheet? Mike Ives Excel Worksheet Functions 1 January 30th 09 12:06 AM
Changing Font in an unlocked cell in a protected sheet. Mark T UK Excel Discussion (Misc queries) 2 October 3rd 08 12:03 PM
Inserting a Comment in a Protected Sheet? jcolley05 Excel Discussion (Misc queries) 1 May 1st 07 04:35 PM
How do I create a comment on an unlocked cell in a protected sheet LObeidat Excel Discussion (Misc queries) 1 July 25th 06 01:14 PM
How do I insert a comment in unlocked cell of a protected workshee TD_Anne Excel Worksheet Functions 2 January 16th 06 07:27 PM


All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"