troubleshooting Question

VBA to Open Cash Drawer via Epson TM-T82

Avatar of kay soo
kay soo asked on
Microsoft AccessVBA
3 Comments1 Solution22 ViewsLast Modified:
Hi Experts,

I try to make a command button to open an Epson TM-T82 connected cash drawer without receipt printing, I hv insalled Epson Virtual Port Driver Utility for the USB-LPT1 interface.

I hv sourced out some codes from the other thread in Expert Exchange and get it to work.

but however the printer still print a tiny print job, is not obvious if the OpenDrawerButton only clicked once, but if clicks for more then 10 times, the wastage of paper is obvious.

based on the following codes, is there anyway or procedures for the printer not to print but just open the drawer?

Private Sub OpenDrawerButton_Click()

    Dim intFileCom As Integer
    Dim strLine As String
    intFileCom = FreeFile
    strLine = Chr(27) & Chr(112) & Chr(0) & Chr(25) & Chr(251)
    ' Open your printer port.
    Open "LPT1" For Output As #intFileCom
    Print #intFileCom, strLine
    Close #intFileCom
End Sub

p/s  from this command line "Print #intFileCom, strLine" , the printer still print about 1mm of blank paper, but the cash drawer opened, I m looking for some code to do away the 1mm printing.  

kay soo

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 3 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 3 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004