WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

auto locking cells after new entry/edit

 
   Home -> Office -> Setup RSS
Next:  Excel printing prompts - recalculation of old for..  
Author Message
patbayns

External


Since: Sep 29, 2008
Posts: 1



(Msg. 1) Posted: Mon Sep 29, 2008 12:56 am
Post subject: auto locking cells after new entry/edit
Archived from groups: microsoft>public>excel>setup (more info?)

Is it possible to set excel to automatically lock a cell after entering data
or after editing?
Back to top
Login to vote
Gord Dibben

External


Since: Feb 23, 2004
Posts: 16344



(Msg. 2) Posted: Mon Sep 29, 2008 3:51 pm
Post subject: Re: auto locking cells after new entry/edit [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes

Using event code.

Assuming column B cells are unlocked and the sheet is protected with
password "justme", as you enter data in column B, the cell will become
locked.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
ActiveSheet.Unprotect Password:="justme"
N = Target.Row
If Excel.Range("B" & N).Value <> "" Then
Excel.Range("B" & N).Locked = True
End If
End If
enditall:
ActiveSheet.Protect Password:="justme"
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.

I'm sure your needs are not exactly as per sample above.

If you provide more detail perhaps code could be tailored.


Gord Dibben MS Excel MVP

On Mon, 29 Sep 2008 00:56:00 -0700, patbayns
<patbayns DeleteThis @discussions.microsoft.com> wrote:

>Is it possible to set excel to automatically lock a cell after entering data
>or after editing?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Setup All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET