Thread: VB CODE
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default VB CODE

Reopen application Or try Application.EnableEvents = True from the immediate
window...

If this post helps click Yes
---------------
Jacob Skaria


"Kanmi" wrote:

Still not working. I think it because i stop the macro when i re-opening the
file but it not working even when i enable it back.

"Shane Devenshire" wrote:

Hi,

Here is my guess - you have stopped the macro after the
Application.EnableEvents = False but before the line that turns it back on.
Hence your macros will not work.

Reconsider the use of those two lines - at least as far as this macro is
concerned they serve no purpose at all because the target range and the range
where you are putting the dates do not intersect.

To reactivate the macros put the following code in a module and run it

Sub MyEnable()
Application.EnableEvents = True
End Sub

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Kanmi" wrote:

Yes that is what I'm looking but it not working.

"Jacob Skaria" wrote:

This will work if you try to change a value from 14th row to 578th row in Row
10 this inserts the date. Is that what you are looking for.

If this post helps click Yes
---------------
Jacob Skaria


"Kanmi" wrote:

Please can anybody help me check this code why is not working. If set of date
below change then Latest Update date on column "10" should automatically
change.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("14:578")) Is Nothing Then Exit Sub
If Target.Cells.Count 10 Then Exit Sub
Application.EnableEvents = False
Cells(10, Target.Column).Value = Date
Application.EnableEvents = True
End Sub