+ Reply to Thread
Results 1 to 3 of 3

More than one Timestamp

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    reading
    MS-Off Ver
    2010
    Posts
    32

    More than one Timestamp

    I currently have a timestamp code, which is working perfectly fine:

    Private Sub worksheet_change(ByVal target As Range)
    Dim wk As Workbook
    Set wk = ThisWorkbook
    Dim ws As Worksheet
    Set ws = ActiveSheet
    WatchedColumn = 20
    BlockedRow = 1
    TimestampColumn = 21
    Crow = target.Row
    CColumn = target.Column
    If CColumn = WatchedColumn And Crow > BlockedRow Then
    Cells(Crow, TimestampColumn) = Now()
    End If

    End Sub

    Now I would like to add another two timestamp codes, which will watch different columns, and add the timestamps to different place. If I add another to the Class Module I get the error "Ambiguous name detected: worksheet_change" and I'm not sure how I need to create multiple timestamps?

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: More than one Timestamp

    You should continue in this same private sub with another condition for target:
    Please Login or Register  to view this content.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    reading
    MS-Off Ver
    2010
    Posts
    32

    Re: More than one Timestamp

    Thanks bulina2k - that has worked perfectly and much easier than what I was trying to do!!

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Timestamp help
    By schlitz69 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-06-2015, 11:05 AM
  2. [SOLVED] VBA - Convert Date/Timestamp into American Date and Military Timestamp
    By ryanmorris in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2015, 03:43 PM
  3. Replies: 18
    Last Post: 02-24-2014, 06:13 PM
  4. Timestamp
    By preciouslife73 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2012, 07:20 PM
  5. TimeStamp
    By AAKASH JAIN in forum Excel General
    Replies: 7
    Last Post: 12-29-2011, 03:19 AM
  6. When a timestamp doesn't behave as a timestamp
    By mredekopp in forum Excel General
    Replies: 3
    Last Post: 03-07-2011, 03:39 PM
  7. [SOLVED] Now as timestamp
    By Lp12 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2006, 06:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1