Hi Guys,
How to record every changing value in Cell (by SpinButton) and will be recorded alternately to another Cell (starting from "B16").
Please find the file to get clear an idea and code.
Thank you so much for any helps and advice.
Private Sub CommandButton1_Click()
Dim PauseTime, Start, Finish, TotalTime, MyTime
Do
Start = Timer
DoEvents
Sheet1.[B4] = Start
UF1.Label1.Caption = Round(Start, 1)
UF1.Label1.Caption = Format(Now)
Loop
End Sub
Private Sub CommandButton2_Click()
End
End Sub
Private Sub SpinButton1_SpinDown()
Dim MyTime
MyTime = Time
Sheet1.[B8] = Format(MyTime)
On Error Resume Next
If Sheet1.[B12] > 0 And Sheet1.[B12] <= 100 Then
Sheet1.[B12] = Sheet1.[B12] - 1
UF1.Label2.Caption = Sheet1.[B12]
Me.TextBox1.Value = Sheet1.[B12] / Sheet1.[C12] * Sheet1.[C13]
Sheet1.[B13] = Me.TextBox1.Value
End If
End Sub
Private Sub SpinButton1_SpinUp()
Dim MyTime
MyTime = Time
Sheet1.[B8] = Format(MyTime)
On Error Resume Next
If Sheet1.[B12] >= 0 And Sheet1.[B12] < 100 Then
Sheet1.[B12] = Sheet1.[B12] + 1
UF1.Label2.Caption = Sheet1.[B12]
Me.TextBox1.Value = Sheet1.[B12] / Sheet1.[C12] * Sheet1.[C13]
Sheet1.[B13] = Me.TextBox1.Value
End If
End Sub
Kind Regards,
Iqbal
Bookmarks