Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that creates subtotals. I want to protect
several cells to the right of the subtotal so the user can be prevented from entering any data in them. I'm looking for suggestions how to accomplish this. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
- select all cells - goto 'Format - Cells - Protection' and uncheck 'Locked' Now in your macro: - set the .locked property of these cells to 'True' - protect the sheet (e.g. activesheet.protect) -- Regards Frank Kabel Frankfurt, Germany "JT" schrieb im Newsbeitrag ... I have a macro that creates subtotals. I want to protect several cells to the right of the subtotal so the user can be prevented from entering any data in them. I'm looking for suggestions how to accomplish this. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.Unprotect
Cells.Locked = False for each cell in Range("B4:B800") if instr(1,cell.Text,"Subtotal",vbTextCompare) 0 then cell.offset(0,1).Resize(1,10).Locked = True end if Next Activesheet.Protect -- Regards, Tom Ogilvy "JT" wrote in message ... I have a macro that creates subtotals. I want to protect several cells to the right of the subtotal so the user can be prevented from entering any data in them. I'm looking for suggestions how to accomplish this. Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lock the entire sheet, then Unlock the cells you want
people to be able to enter information into then protect the sheet. This will allow the user to only enter data in cells you want them to use. -----Original Message----- I have a macro that creates subtotals. I want to protect several cells to the right of the subtotal so the user can be prevented from entering any data in them. I'm looking for suggestions how to accomplish this. Thanks. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect Cells | Excel Discussion (Misc queries) | |||
protect cells in excel, but also allow a search in those cells? | Excel Worksheet Functions | |||
How do I protect cells or a range of cells in excel spreadsheet? | Excel Worksheet Functions | |||
Protect Only Certain Cells | Excel Discussion (Misc queries) | |||
Protect only certain Cells? | Excel Discussion (Misc queries) |