Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protect Cell automatically


Hi to all
I have worksheet with more of function. is it possible to
protect cell where ever their is function in cell
automatically.

thanks in advance.

Shah
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Protect Cell automatically


record this with macro recorder

[F5] (goto dialog)
Special (button)
Formulas (radio)
(+4 checkboxes CHECKED)
ok (button)

ctrl F1 (cell properties dialog)
protection (tab)
locked (check)
ok (button)



and add a line to make sure the other cells are not locked.

This is the result..

Sub Macro1()
Cells.Locked = False 'this was manually added
Selection.SpecialCells(xlCellTypeFormulas, 23).Select
Selection.Locked = True
Selection.FormulaHidden = False
End Sub

now turn on sheet protection and you're done.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"shah" wrote:


Hi to all
I have worksheet with more of function. is it possible to
protect cell where ever their is function in cell
automatically.

thanks in advance.

Shah


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
Protect or Unprotect Cell dependent on different cell David Bruce Excel Discussion (Misc queries) 2 March 26th 10 02:19 PM
Is it possible to protect cell formatting in an unlocked cell? Robotbird Excel Discussion (Misc queries) 2 August 25th 09 01:38 PM
EXCEL: Protect a cell depending on another cell value frenchflo Excel Worksheet Functions 1 October 11th 06 05:36 PM
how to protect one cell and not others Cyrus Excel Discussion (Misc queries) 1 December 23rd 05 03:23 PM
protect specific cell but allow edit on other cell chiuinggum Excel Worksheet Functions 5 December 8th 05 06:22 PM


All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"