Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically Protect/Unprotect Ranges in Excel 2003?
Hi All,
I've got a spreadsheet with a few checkboxes. If a user checks one, I want them to be able to edit specific cells. If they uncheck it, I want the values they've entered zeroed out and the cells to be protected. I can accomplish the second piece by unprotecting the sheet, zeroing the values entered, then reprotecting the sheet. However, I haven't found out how to unprotect a range so that the user can make entries after they've checked the box. Does anyone know if this can be done and if so, any pointers or sites with samples you can point me to? Thanks & Ciao, Tony |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically Protect/Unprotect Ranges in Excel 2003?
activesheet.Unprotect
range("B9:F10").Locked = False Activesheet.Protect -- Regards, Tom Ogilvy "Tony" wrote: Hi All, I've got a spreadsheet with a few checkboxes. If a user checks one, I want them to be able to edit specific cells. If they uncheck it, I want the values they've entered zeroed out and the cells to be protected. I can accomplish the second piece by unprotecting the sheet, zeroing the values entered, then reprotecting the sheet. However, I haven't found out how to unprotect a range so that the user can make entries after they've checked the box. Does anyone know if this can be done and if so, any pointers or sites with samples you can point me to? Thanks & Ciao, Tony |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically Protect/Unprotect Ranges in Excel 2003?
Tom,
Worked like a charm. I appreciate the assistance. Tony "Tom Ogilvy" wrote in message ... activesheet.Unprotect range("B9:F10").Locked = False Activesheet.Protect -- Regards, Tom Ogilvy "Tony" wrote: Hi All, I've got a spreadsheet with a few checkboxes. If a user checks one, I want them to be able to edit specific cells. If they uncheck it, I want the values they've entered zeroed out and the cells to be protected. I can accomplish the second piece by unprotecting the sheet, zeroing the values entered, then reprotecting the sheet. However, I haven't found out how to unprotect a range so that the user can make entries after they've checked the box. Does anyone know if this can be done and if so, any pointers or sites with samples you can point me to? Thanks & Ciao, Tony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to select Range to protect and unprotect ranges | Excel Worksheet Functions | |||
Problem using protect/Unprotect in excel 97 | Excel Programming | |||
unprotect/protect grouped worksheets in excel | Setting up and Configuration of Excel | |||
Excel VBA-Protect and unprotect sheet with BVA | Excel Programming | |||
Excel VBA - Problems using Protect/Unprotect a worksheet | Excel Programming |