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: 61
Default How to get worksheet change code to work on protected worksheet?

As an aside, I'm getting so much better at modifying code that I get
from the ng archives now. Long time coming since I'm just not a
natural at all this stuff <g! I was able to modify the code below
and it works great except when I protect the worksheet.

--------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
On Error GoTo ErrHandler
If Target.Column = 3 Then ' COLUMN 3=COLUMN C
Application.EnableEvents = False
If Not IsEmpty(Target) Then
Cells(Target.Row, 2).Value = Now ' COLUMN THAT HAS DATE ADDED
TO IT
' Cells(Target.Row, 1).NumberFormat = 'yyyy.mm.dd.ddd., hh"h"mm'
Else
Cells(Target.Row, 2).ClearContents ' COLUMN THAT HAS DATE
ADDED TO IT, make sure it's the same as above.
End If
End If

ErrHandler:
Application.EnableEvents = True
End Sub
--------------------------------

Is there any way to get have it work without leaving the sheet
unprotected? Thx! :oD

 
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
I need a work around for a protected worksheet Richard Setting up and Configuration of Excel 1 December 22nd 07 10:28 PM
AutoFilter can't work after the worksheet is being protected!!! Jac Excel Programming 7 June 26th 07 04:36 PM
How to make TAB key work in a protected worksheet Sri Ram[_2_] Excel Programming 1 August 18th 06 07:10 AM
Can't Get Objects To Work In A Protected Worksheet OMMBoy Excel Worksheet Functions 2 May 27th 06 06:28 PM
Why doesn't spell check work on a protected worksheet? Creating Order Forms is Fun Excel Worksheet Functions 6 December 22nd 04 07:34 PM


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