Thanks for the feedback and welcome to the board
Hello Again
I figured that I would ask you, prior to posting, since you have seen the code already.
I was trying to make the Timer work with a variable not a constant.
Wondering if you have any ideas
Code:
Public Const AllowedTime As Double = 1[CODE]
Private Sub CommandButton1_Click()Dim T, E, M As Double, S As Double
T = Timer
Do
E = CDbl(Time) * 24 * 60 * 60 - T
M = AllowedTime - 1 - Int(E / 60)
S = 59 - Round((E / 60 - Int(E / 60)) * 60, 0)
With tBx1
.Value = Format(CStr(M), "00") & ":" & Format(CStr(S), "00")
End With
DoEvents
If (Timer - T) / 60 = AllowedTime Then
Range("A28").Value = Range("A28").Value + 1
Range("B1").Value = "=VLOOKUP(A28,A2:E26,2,0)"
Range("B1") = Range("B1")
Range("C1").Value = "=VLOOKUP(A28,A2:E26,3,0)"
Range("C1") = Range("C1")
Range("D1").Value = "=VLOOKUP(A28,A2:E26,4,0)"
Range("D1") = Range("D1")
Range("E1").Value = "=VLOOKUP(A28,A2:E26,5,0)"
Range("E1") = Range("E1")
Range("B27").Value = "=VLOOKUP(A28+1,A2:E26,2,0)"
Range("B27") = Range("B27")
Range("C27").Value = "=VLOOKUP(A28+1,A2:E26,3,0)"
Range("C27") = Range("C27")
Range("D27").Value = "=VLOOKUP(A28+1,A2:E26,4,0)"
Range("D27") = Range("D27")
Range("E27").Value = "=VLOOKUP(A28+1,A2:E26,5,0)"
Range("E27") = Range("E27")
Range("G27").Value = "=(f27) & (G22*J22+G24*J24+G25*J25)"
Range("G28") = Range("G27")
Range("G26").Value = "=+G22*(K22+G24*K24+G25*K25)/G23"
Range("G26") = Range("G26")
End If
Loop Until (Timer - T) / 60 >= AllowedTime
Call CommandButton1_Click
End Sub[/CODE]
Thanks for any help