#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Protection

Hi

I have two questions.

The first one: is it possible to protect certain parts and not the
whole worksheet and,
The second one: is it possible to prevent a person changing the name of
a worksheet.

Thanks

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Protection

1. you can unlock the cells you don't want protected under format cells, and
then protect the sheet

2. use the sheet code name in any code you write, this is one way to assure your
code runs (if that's the reason you want to restrict the name change)
in the vbe, you can see the code name ( and change it) by clicking view and then
properties window. it's the one at the top with name in the ()

--


Gary


"Gregc." wrote in message
oups.com...
Hi

I have two questions.

The first one: is it possible to protect certain parts and not the
whole worksheet and,
The second one: is it possible to prevent a person changing the name of
a worksheet.

Thanks

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Protection

just to elaborate a little,
you can also choose tools/protection/protect workbook and then select structure
and the sheets will not be able to be renamed (use a password if you want to)

also, if you didn't want to do this, you could use something like this:

if you rename sheet1's tab and then ran this code, it would rename it back to
sheet1.

Sub test2()
Sheet1.Name = "Sheet1"
Worksheets("Sheet1").Range("a1").Value = 987
End Sub

sheet1.name is using the codename to rename the tab "sheet1"

if you wanted sheet1 to be named Jan

then this code would do that
Sub test2()
Sheet1.Name = "Jan"
Worksheets("Jan").Range("a1").Value = 123
End Sub


use either option you want.

--


Gary


"Gregc." wrote in message
oups.com...
Hi

I have two questions.

The first one: is it possible to protect certain parts and not the
whole worksheet and,
The second one: is it possible to prevent a person changing the name of
a worksheet.

Thanks

Greg



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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
WS Protection: Different Levels of Protection on Different Ranges Carmi Excel Discussion (Misc queries) 4 August 31st 07 02:26 PM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


All times are GMT +1. The time now is 08:12 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"