#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Locking Cells

I have a button and when pressed it emails certain users, when the button has
been pressed i need to lock down certain cells so that users cannot edit
these cells.

Can anyone help?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 833
Default Locking Cells

Let me assume that I wish to protect the following range of cells D 83 to D
85 (inclusive) in a particular worksheet.

In EXCEL 2007 take the following action:-

1. Highlight all the cells in your Worksheet by clicking in the box to the
left of A and above 1 in the top left hand corner.

This should cause your Worksheet to become highlighted.

2. Hit Ctrl-1 to launch Format Cells.

3. Protection tab.

4. Remove the green tick from the box called:-

Locked

- then hit OK.

5. Highlight cells D 83 to D 85 inclusive in your Worksheet.

This should cause those cells to become highlighted.

6. Ctrl-1 to launch Format Cells once more.

7. Protection tab.

8. Place a green tick from the box called:-

Locked

- then hit OK.

9. Home / Cells group / Format / Protect Sheet / place a password in the box
called:-

Password to unprotect sheet

(I have used password called test).

At this point there are 3 cells on this window that should have a green tick
in them. They a-

Protect worksheet and contents of locked cells

Select locked cells

Select unlocked cells

After you have entered your password hit OK and then put the password in
again in the box called:-

Reenter password to proceed.

- and then hit OK.

Save the file at this point if required.

10. Close and re-open the file.

Now try to amend any of the cells D 83 to D 85 in the Worksheet and you will
not be able to.

11. Now try to amend any other cells (apart from D 83 to D 85) and you will
be able to amend them.

Please hit Yes if my comments have helped.

Thanks!



"Neil Holden" wrote:

I have a button and when pressed it emails certain users, when the button has
been pressed i need to lock down certain cells so that users cannot edit
these cells.

Can anyone help?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Locking Cells

Try the below...before and after your code....

With Sheets("Sheet1")
..Cells.Locked = False
..Range("A1:A10").Locked = True
..Protect
End With

'your other code

Sheets("Sheet1").Unprotect


--
Jacob


"Neil Holden" wrote:

I have a button and when pressed it emails certain users, when the button has
been pressed i need to lock down certain cells so that users cannot edit
these cells.

Can anyone help?

Thanks

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
Locking Cells RTaylor Excel Worksheet Functions 2 January 25th 10 06:29 PM
Locking cells Duplatt New Users to Excel 8 November 30th 07 06:39 PM
Cells Locking? Norm Excel Discussion (Misc queries) 7 June 19th 07 02:45 PM
Locking Cells SJT Excel Discussion (Misc queries) 2 October 29th 06 10:09 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM


All times are GMT +1. The time now is 01:43 AM.

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"