sooty8
03-23-2009, 12:59 PM
Hi All
Is it possible to alter the code below to restrict just one entry on the day I would be using the code. For example I could receive 6 items of data to enter however only the first entry on the day is the one that matters to this particular code. I can enter the other 5 items using a different CommandButton -- but when entering data I occasionally use the one one listed below by mistake and it then I have to start all over again. Perhaps a message box telling me I have already used it today??
Private Sub Av1_Click()
cbo71.Value = txtTitle.Text
Sheets("OB;In;Av").Select
Dim c As Range, Cntrl As Control
Set c = Columns(1).Find(cbo71, LookIn:=xlValues, lookat:=xlWhole)
c.Offset(, 2) = c.Offset(, 2) + (txtMiles * 105600) + (txtYards * 60)
c.Offset(, 3) = c.Offset(, 3) + (TextCalcHrs * 3600) + (TextCalcMins * 60) + (TextCalcSecs)
c.Offset(, 4) = c.Offset(, 2) / c.Offset(, 3)
'Count races
c.Offset(, 5) = c.Offset(, 5) + 1
End Sub
Thanks
Sooty8
Is it possible to alter the code below to restrict just one entry on the day I would be using the code. For example I could receive 6 items of data to enter however only the first entry on the day is the one that matters to this particular code. I can enter the other 5 items using a different CommandButton -- but when entering data I occasionally use the one one listed below by mistake and it then I have to start all over again. Perhaps a message box telling me I have already used it today??
Private Sub Av1_Click()
cbo71.Value = txtTitle.Text
Sheets("OB;In;Av").Select
Dim c As Range, Cntrl As Control
Set c = Columns(1).Find(cbo71, LookIn:=xlValues, lookat:=xlWhole)
c.Offset(, 2) = c.Offset(, 2) + (txtMiles * 105600) + (txtYards * 60)
c.Offset(, 3) = c.Offset(, 3) + (TextCalcHrs * 3600) + (TextCalcMins * 60) + (TextCalcSecs)
c.Offset(, 4) = c.Offset(, 2) / c.Offset(, 3)
'Count races
c.Offset(, 5) = c.Offset(, 5) + 1
End Sub
Thanks
Sooty8