By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,930 Members | 633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,930 IT Pros & Developers. It's quick & easy.

Excel 2000 Worksheet Protection

P: n/a
Hi,

I am using the following code to protect the active worksheet:

Excel.Worksheet activeWorkSheet = (Excel.Worksheet)
excelApp.ActiveWorkbook.ActiveSheet;

activeWorkSheet.Protect("password", missing, missing, missing,
missing);

This works fine but i would like to unprotect certain cells so they do
not require the user to unprotect the worksheet before editing.

Any ideas ?

TIA

Luke
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Luke,

I don't believe that this level of granularity exists. If you protect
the whole worksheet, then I would expect that everything in the worksheet is
protected. If anything, I would put the cells on another worksheet that is
not protected.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <lu**********@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
Hi,

I am using the following code to protect the active worksheet:

Excel.Worksheet activeWorkSheet = (Excel.Worksheet)
excelApp.ActiveWorkbook.ActiveSheet;

activeWorkSheet.Protect("password", missing, missing, missing,
missing);

This works fine but i would like to unprotect certain cells so they do
not require the user to unprotect the worksheet before editing.

Any ideas ?

TIA

Luke

Nov 15 '05 #2

P: n/a
Sure you can.

Select your range that you want unprotected (I believe by default that cells
are locked) and
then call Select() on that range. Then set Selection.Locked = false, and the
protect the worksheet.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OR**************@TK2MSFTNGP11.phx.gbl...
Luke,

I don't believe that this level of granularity exists. If you protect
the whole worksheet, then I would expect that everything in the worksheet is protected. If anything, I would put the cells on another worksheet that is not protected.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <lu**********@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
Hi,

I am using the following code to protect the active worksheet:

Excel.Worksheet activeWorkSheet = (Excel.Worksheet)
excelApp.ActiveWorkbook.ActiveSheet;

activeWorkSheet.Protect("password", missing, missing, missing,
missing);

This works fine but i would like to unprotect certain cells so they do
not require the user to unprotect the worksheet before editing.

Any ideas ?

TIA

Luke


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.