Results 1 to 4 of 4

Record time based on value being selected in list box

Threaded View

Jadesky Record time based on value... 05-28-2010, 02:25 PM
Jadesky Re: Record time based on... 05-28-2010, 05:19 PM
teylyn Re: Record time based on... 05-29-2010, 04:28 AM
Jadesky Re: Record time based on... 05-31-2010, 09:16 PM
  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Record time based on value being selected in list box

    Hello,

    I'm trying to figure out how to record the time that a user selects an option in a list box. I have two list boxes in their own sheet that get their info from two different worksheets.

    I pass the listvalue to the worksheet, to select the item. But I need to record the time the listvalue changed on that worksheet. I put code below into a sheet, but it only works when I manually change the number in E4, not when you change the value of E4 (the listvalue) by using the drop down.

    Please, please any help really gratefully appreciated!

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    With Target
    If .Count > 1 Then Exit Sub
    If Not Intersect(Range("E4"), .Cells) Is Nothing Then
    Application.EnableEvents = True
    If IsEmpty(.Value) Then
    .Offset(0, 3).ClearContents
    Else
    With .Offset(0, 2)
    .NumberFormat = "dd mmm yyyy hh:mm:ss"
    .Value = Now
    End With
    End If
    Application.EnableEvents = True
    End If
    End With
    End Sub
    Last edited by Jadesky; 05-31-2010 at 09:17 PM.

Thread Information

Users Browsing this Thread

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

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