+ Reply to Thread
Results 1 to 3 of 3

Line Printing

Hybrid View

chadwellp Line Printing 01-11-2010, 11:32 PM
davesexcel Re: Line Printing 01-11-2010, 11:53 PM
Leith Ross Re: Line Printing 01-12-2010, 12:16 AM
  1. #1
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Question Line Printing

    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
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Line Printing

    You should remove the worksheets and VBA code that do not pertain to your question in your sample.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Line Printing

    Hello chadwellp,

    I need to instantly print the cell containing the Bib# and the cell containing the date/timestamp to a battery operated serial tape printer
    You don't provide us with any details about this printer other than it is a serial device. Serial devices are not all the same. There are many parameters used by serial devices that control how they communicate. Who makes the printer? What is the make and model?

    Another, a probably simpler, option would be to output the data to text file and save it on a flash drive. Configuring a printer is not a easy task. Especially when it may not be included in the Plug-n-Play device list.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1