dropdown list select event.

  • Thread starter Thread starter PBcorn
  • Start date Start date
P

PBcorn

I have a custom dropdown data validation, but need to capture the point at
which the selection is made by the user in order to measure the time between
this and a comanndbutton press. Any ideas?
 
in a module add a PUBLIC variable as DOUBLE
set the value of this using the sheet's change event to trap the value
changing
use the cutton's code to get the elapsed time...
here's a sample sheet code (rigth-click the sheet tab & select view code

Option Explicit
Public t As Double
Private Sub Worksheet_Change(ByVal Target As Range)
t = Timer
End Sub
Private Sub CommandButton1_Click()
MsgBox Timer - t
End Sub

this sets the time for ANY changes...so you'll need to test if the cell
that's changed is the cell containing the validation etc etc...but this is
just an exampel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top