TIME

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

THANKS FOR YOUR HELP IN ADVANCE.

I WANT A LITTLE WATCH / DIGITAL CLOCK TO APPEAR IF I TOUCH A CELL...WITH
THIS CLOCK, I WILL BE ABLE TO INSERT THE REQUIRED TIME INTO THE CELL I
TOUCHED....ANY SUGGESTIONS / CODE?
 
if nobody has anything more elegant build a userform with 2 spin buttons and
a textbox and put this in the code, make it pop up on click event, and make a
button that changes activecell to value and close
Dim y As Long
Dim x As Long
Private Sub SpinButton1_SpinDown()
y = y - 1
TextBox1.Text = x & ":" & y
End Sub

Private Sub SpinButton1_SpinUp()
y = y + 1
TextBox1.Text = x & ":" & y
End Sub

Private Sub SpinButton2_SpinDown()
x = x - 1
TextBox1.Text = x & ":" & y
End Sub

Private Sub SpinButton2_SpinUp()
x = x + 1
TextBox1.Text = x & ":" & y
End Sub

Private Sub UserForm_Activate()
x = Hour(Now())
y = Minute(Now())
TextBox1.Text = x & ":" & y
End Sub
 

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