Using a USB to parallel adapter doesn't make any sense. Here we are speaking about using a very old legacy software on hardware with USB only connections. In my case, a ZEBRA label printer.
The solution in my case was.
- Install the USB printer with its drivers (just to find on which USB port is connected)
- Change the driver's port to FILE (and free up the USB port)
- Install a Generic / Text Only driver and change the port to the same logical USB port as seen on point 1
- Share the Generic /Text Only printer in order to make it visible easily in VBA
- Install the Microsoft Loopback adapter on a fixed unused IP address (otherwise your printer will be not visible when the cable is disconnected)
- Assign a LPTx: port as explained before by command line (this is for every SW that needs an old LPT)
With few rows of code you will be able to send ASCII codes to the printer as used in the past.
Now you can easily print in VBA (tested with Windows 7 64-bit and ZM400 Zebra printer)
Open "\\Kb\ZM400" For Output As #1 'Kb = computer Name; ZM400 = Shared printer name
For rows = 1 To 37 ' send the first 37 rows of ASCII codes from the worksheet "STRINGS"
Print #1, Worksheets("STRINGS").Cells(rows, 1).Value