Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Change cell color in protected sheet

I have a worksheet where some cells are locked and the whole sheet is
protected. The users should be able to:
1. Enter data into the cells that are not locked
2. Group and ungroup
3. Filter
4. Change the color of the cells that are not locked

1 is not a problem, 2 and 3 is possible thanks to the code below (that I got
help with at this excellent forum!), but how do I solve 4? When I protect the
sheet I check all the boxes under "Tools/Protection/Protect sheet" including
"Format cells" but if I close and reopen the workbook it is no longer
possible to format the cells (at least not the color). I have Excel 2003. I
guess I should add some line to the code below to enable the color change but
what?

Private Sub Workbook_Open()
With Worksheets("my sheet name")
.EnableOutlining = True
.EnableAutoFilter = True
.Protect Password:="my password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Greatful for all help,
Ansa
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Change cell color in protected sheet

Private Sub Workbook_Open()
With Worksheets("my sheet name")
.EnableOutlining = True
.EnableAutoFilter = True
.Protect Password:="my password", _
Contents:=True, UserInterfaceOnly:=True, _
AllowFormattingCells:=True

End With
End Sub


Regards,
Stefi

€žansa€ť ezt Ă*rta:

I have a worksheet where some cells are locked and the whole sheet is
protected. The users should be able to:
1. Enter data into the cells that are not locked
2. Group and ungroup
3. Filter
4. Change the color of the cells that are not locked

1 is not a problem, 2 and 3 is possible thanks to the code below (that I got
help with at this excellent forum!), but how do I solve 4? When I protect the
sheet I check all the boxes under "Tools/Protection/Protect sheet" including
"Format cells" but if I close and reopen the workbook it is no longer
possible to format the cells (at least not the color). I have Excel 2003. I
guess I should add some line to the code below to enable the color change but
what?

Private Sub Workbook_Open()
With Worksheets("my sheet name")
.EnableOutlining = True
.EnableAutoFilter = True
.Protect Password:="my password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Greatful for all help,
Ansa

  #3   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by Stefi View Post
Private Sub Workbook_Open()
With Worksheets("my sheet name")
.EnableOutlining = True
.EnableAutoFilter = True
.Protect Password:="my password", _
Contents:=True, UserInterfaceOnly:=True, _
AllowFormattingCells:=True

End With
End Sub


Regards,
Stefi

€žansa€ť ezt Ă*rta:

I have a worksheet where some cells are locked and the whole sheet is
protected. The users should be able to:
1. Enter data into the cells that are not locked
2. Group and ungroup
3. Filter
4. Change the color of the cells that are not locked

1 is not a problem, 2 and 3 is possible thanks to the code below (that I got
help with at this excellent forum!), but how do I solve 4? When I protect the
sheet I check all the boxes under "Tools/Protection/Protect sheet" including
"Format cells" but if I close and reopen the workbook it is no longer
possible to format the cells (at least not the color). I have Excel 2003. I
guess I should add some line to the code below to enable the color change but
what?

Private Sub Workbook_Open()
With Worksheets("my sheet name")
.EnableOutlining = True
.EnableAutoFilter = True
.Protect Password:="my password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Greatful for all help,
Ansa
This soundes perfect, just what I need. But I have no idea where to enter the code, Please can you direct me?
Many thanks
Nic
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
How to change font colour in unlocked cell of protected sheet Michelle Excel Discussion (Misc queries) 2 September 16th 08 05:58 PM
Change font color in protected worksheet Dyanna Excel Worksheet Functions 2 November 21st 07 01:43 PM
Change Source of Link in Protected Sheet Chiku Excel Discussion (Misc queries) 0 December 22nd 05 06:37 PM
change font when sheet is protected vivisss Excel Discussion (Misc queries) 1 February 7th 05 07:54 PM
How do I change the Cell color automatically in an Excel sheet wh. stump Excel Worksheet Functions 2 January 6th 05 02:14 PM


All times are GMT +1. The time now is 05:03 PM.

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"