Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sgmoorthy
 
Posts: n/a
Default How do I lock the Column without Protecting the Sheet

I want to Lock a Column without protecting the sheet.
the user can enter anything in other columns but he/she should not alter
anything
in particular column that i locked
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default How do I lock the Column without Protecting the Sheet

Protecting the sheet is - by far - the easiest way, otherwise you must useVBA
to capture and deny changes to that column. I think you'd have to be pretty
elaborate, too, to trap all potential changes.

"sgmoorthy" wrote:

I want to Lock a Column without protecting the sheet.
the user can enter anything in other columns but he/she should not alter
anything
in particular column that i locked

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default How do I lock the Column without Protecting the Sheet

You could try to depend on a macro to stop them (like Duke wrote).

But if the user disables macros or even just disables events, then this won't
work.

And depending on what alter means, it might not be sufficient. (Changing
font/hiding the column/hiding a row won't get caught.)

If you still want to try...

Right click on the worksheet tab that should have this behavior and select view
code. Paste this into the code window that you see:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Me.Range("C:C"), Target) Is Nothing Then
Exit Sub
Else
With Application
.EnableEvents = False
.Undo
.EnableEvents = True
End With
MsgBox "Please don't change column C--last change undone!"
End If

End Sub




sgmoorthy wrote:

I want to Lock a Column without protecting the sheet.
the user can enter anything in other columns but he/she should not alter
anything
in particular column that i locked


--

Dave Peterson
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
creating a formul George A. Yorks Excel Discussion (Misc queries) 43 October 13th 06 10:36 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Copying a column to a new sheet so that cells match. Nadeem Excel Worksheet Functions 0 October 11th 05 02:03 PM
Copying (Master) column to another sheet to automatically update LostInVirtualSpace Excel Worksheet Functions 0 September 19th 05 06:57 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM


All times are GMT +1. The time now is 08:57 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"