I am writing a program used for time tracking a foot race. As runners cross the finish line, the runner's Bib# is entered into a cell and an ENTER button is pressed. The program searches a list of Bib#s and enters the date/timestamp int a cell to the right. I have this working. After writing a date and time to a cell, I need to instantly print the cell containing the Bib# and the cell containing the date/timestamp to a battery operated serial tape printer as a printed backup in case of computer failure. I need to figure out the write commands to make this happen. The data entry is to the right side on the "Participants" worksheet attached. Here is the logic below for the data entry:
Private Sub BtnEnter_Click()
Dim rRng As Range
Dim rStartCell As Range
Dim strFindText As String
strFindText = ThisWorkbook.Sheets("Participants").Range("R7").Text
Set rRng = Range("Bib")
Set rStartCell = rRng.Find(What:=strFindText)
If Not rStartCell Is Nothing Then
rStartCell.Offset(ColumnOffset:=1).Value = Date + Time
Else
MsgBox Title:="No Match", _
Prompt:="Search item was not found.", _
Buttons:=vbOKOnly
End If
End Sub
Bookmarks