Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I lock worksheets so only a couple ranges on each allow inp
I have several worksheets w/ fields that display information and allow user
input in a couple of areas on each sheet. Each as macro buttons the user pushes after his input to update another database worksheet. How do I lock the entire db worksheet and all columns on the other sheets except the ranges user input is allowed. The macros need to be able to update data in the locked areas of any sheet. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I lock worksheets so only a couple ranges on each allow inp
John Wrote: I have several worksheets w/ fields that display information and allow user input in a couple of areas on each sheet. Each as macro buttons the user pushes after his input to update another database worksheet. How do I lock the entire db worksheet and all columns on the other sheets except the ranges user input is allowed. The macros need to be able to update data in the locked areas of any sheet. You could unlock all the cells in the range manually while designing your sheets( Format Cellprotectionlock untick) to which you want user to have access ( or you can unlock the range through a procedure ) and then protect all the sheets. Unprotect the sheets in your procedure before you want to write data to protected area and protect it again after you finish writing data. Say I have a table of 10 rows and 2 cols (A1:B10). I want to give access to users to col A but not B. After entering data in A, user clicks a button and then the macro displays calculated results in B. I would have initialising statements Range(cells(1,1),cells(10,1).locked=false Sheets("sheet 1").Protect Password="abcd" This will allow user access to col A 10 rows, but nowhere on the sheet. My macro could be something like Sheets("sheet1").Unprotect Password="abcd" [B1]=.. [B2]=.. etc Sheets("sheet1").Protect Password="abcd" What I am doing is unprotecting the sheet just before I want to update col B and then protecting it again. -- avveerkar ------------------------------------------------------------------------ avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338 View this thread: http://www.excelforum.com/showthread...hreadid=503151 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide/lock worksheets | Excel Worksheet Functions | |||
how do I lock the first tab of multiple worksheets | Excel Worksheet Functions | |||
How do I lock some of the worksheets in an excel 07 spreadsheet | Excel Worksheet Functions | |||
A couple of questiosn on Named Ranges | Excel Discussion (Misc queries) | |||
How can I lock worksheets while macros can still enter into them? | Excel Discussion (Misc queries) |