+ Reply to Thread
Results 1 to 3 of 3

Timestamp based on List Box Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    52

    Timestamp based on List Box Macro

    I'm trying to create a timstamp based on the values that a List Box produces. I tried to apply a timestamp I previously used but it doesn't work on the List Box Value. Here's an example of the timestamp I'm trying to use.

        Private Sub Worksheet_Change(ByVal Target As Excel.Range)
            With Target
                If .Count > 1 Then Exit Sub
                If Not Intersect(Range("C2"), .Cells) Is Nothing Then
                    Application.EnableEvents = False
                    If IsEmpty(.Value) Then
                        .Offset(0, 1).ClearContents
                    Else
                        With .Offset(0, 1)
                            .NumberFormat = "dd mmm yyyy hh:mm:ss"
                            .Value = Now
                        End With
                    End If
                    Application.EnableEvents = True
                End If
            End With
        End Sub
    Any idea how I can modify so the timestamp will work based on the value the List Box produces?

  2. #2
    Registered User
    Join Date
    05-10-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Timestamp based on List Box Macro

    Any suggestions? I'm stumped.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Timestamp based on List Box Macro

    Hi BVT,

    I didn't use a lisbox, but put values in a new workbook (all formats general) in cell "C2" and got the expected result (using Excel 2003) in Cell "D2" (.e.g. "4/15/2014 5:52:02 PM").

    When I changed the format of "D2" to text or a number, I still get the desired result.

    I'm stumped too.

    Lewis

+ 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. Formula to check ID and timestamp against list
    By blacklotus0014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2013, 06:17 PM
  2. [SOLVED] Timestamp based on formula value
    By mmogharreban in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-19-2012, 01:26 PM
  3. write a sublist and tabulate timestamp next to matching value in list
    By anansi boy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-31-2012, 12:19 AM
  4. Finding AVERAGE based on DAY from TIMESTAMP
    By smuqeet in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 01:38 PM
  5. Timestamp - automated based on the next cell
    By harpscardiff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-24-2006, 07:55 AM

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