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: 96
Default Timestamp Macro

Hey, all....In another post in these forums, a gent had posted a really slick
macro to insert a timestamp in a row, if any cells in that row changed. I
"leveraged" that code (below). Problem is, it worked PERFECTLY for awhile,
and then completely stopped. I have inserted Debug code right at the top of
the subroutine, and it does not dump anything to the immediate window. I
have no idea why the macro worked so well, then stopped.

I have data in columns A through Z. My timestamp "was" going into column
AA, until it crapped out. Any ideas?

Thanks!,
PatK





Private Sub Worksheet_Change(ByVal Target As Range)

Set t = Target
tr = t.Row
Set r = Range("A:Z")


If Intersect(t, r) Is Nothing Then Exit Sub

Set rr = Range("A" & tr & ":Z" & tr)
n = Application.WorksheetFunction.CountA(rr)
Debug.Print n
Application.EnableEvents = False

If n = 0 Then
Cells(tr, "AA").Clear
End If
If n = 1 Then
Cells(tr, "AA").Value = Now
End If

Cells(tr, "AB") = Now
Application.EnableEvents = True
End Sub
 
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
need help with timestamp macro jrm Excel Discussion (Misc queries) 2 August 27th 08 06:47 PM
Timestamp juanpablo Excel Discussion (Misc queries) 3 November 2nd 07 01:55 PM
Timestamp in log bob engler Excel Programming 1 October 10th 06 05:35 AM
Timestamp Macro alexfthe Excel Worksheet Functions 1 March 12th 06 11:39 PM
macro for timestamp option button gwallace Excel Programming 1 October 24th 03 06:11 PM


All times are GMT +1. The time now is 10:01 PM.

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"