Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Guys, I want to lock a cell or row so that the user of the spreadseet won't be able to edit the contents of the cell or row. Any help would be greatly appreciated, Aidan -- afmullane ------------------------------------------------------------------------ afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567 View this thread: http://www.excelforum.com/showthread...hreadid=538431 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
select the cells/rows/ranges
format=Cells=Protection Tab, click Locked then Tools=Protect sheet -- Regards, Tom Ogilvy "afmullane" wrote: Hi Guys, I want to lock a cell or row so that the user of the spreadseet won't be able to edit the contents of the cell or row. Any help would be greatly appreciated, Aidan -- afmullane ------------------------------------------------------------------------ afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567 View this thread: http://www.excelforum.com/showthread...hreadid=538431 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I should add that all cells by default are Locked. this is not applied
until the sheet is protected - so in practicality, you need to select the cells you want the user to have access to and do format=Cells=Protection tab and click unlocked. Then protect the sheet. -- Regards, Tom Ogilvy "afmullane" wrote: Hi Guys, I want to lock a cell or row so that the user of the spreadseet won't be able to edit the contents of the cell or row. Any help would be greatly appreciated, Aidan -- afmullane ------------------------------------------------------------------------ afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567 View this thread: http://www.excelforum.com/showthread...hreadid=538431 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Tom, Thanks for your help Tom but do you know of a way of locking a cel from the user but that the cell can still be manipulated through VB code?? Aida -- afmullan ----------------------------------------------------------------------- afmullane's Profile: http://www.excelforum.com/member.php...fo&userid=3356 View this thread: http://www.excelforum.com/showthread.php?threadid=53843 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to just have your code unprotect the sheet, do its changes and
reprotect the sheet. with worksheets("sheet99") .unprotect password:="hithere" 'do the work .protect password:="hithere" end with An alternative is to protect the sheet in code. Option Explicit Sub auto_open() With Worksheets("sheet99") .Protect Password:="hithere", userinterfaceonly:=True End With End Sub It needs to be reset each time you open the workbook. (excel doesn't remember it after closing the workbook.) If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm There are a few things that your macro won't be able to do--so test your code before you distribute the workbook. afmullane wrote: Hi Tom, Thanks for your help Tom but do you know of a way of locking a cell from the user but that the cell can still be manipulated through VBA code?? Aidan -- afmullane ------------------------------------------------------------------------ afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567 View this thread: http://www.excelforum.com/showthread...hreadid=538431 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to lock the Ctrl key? (as locking the Shift key w/Caps Lock) | Excel Discussion (Misc queries) | |||
how do I undo the scroll lock, thscroll lock button does not work | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) | |||
Lock data in a cell a specific cell based on selection on other ce | Excel Worksheet Functions |