LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default HasFormula protect cell

Hello wizards,

Below sub works and does not work ...!!!
I mean: clicking on a cell that has a formula will "protect" the sheet
.... as you can unprotect the sheet. (ToolsProtectionUnprotect)
**But** does actually NOT protect at all as I can just overwrite the
formula in the cell!

Just try and see what I mean...

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.HasFormula = True Then
Me.Protect Password:=""
Else
Me.Unprotect Password:=""
End If
End Sub

Cheers Sige
 
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
Protect Cell Steven Excel Worksheet Functions 1 January 21st 06 06:37 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 05:09 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"