ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TIME (https://www.excelbanter.com/excel-programming/394460-time.html)

Ronel

TIME
 
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?

John Bundy

TIME
 
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


--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Ronel" wrote:

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?



All times are GMT +1. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com