Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
does anybody know how i can write some code in visual basic that can print something on a labelsticker using a zebra printer, where te values are coming from an excelsheet. Also certain cells in this sheet. Regards, ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can loop through your desired fields, you can send the target
text to the zebra printer (I'm assuming local) via the LPT port of your PC. There are other methods, but this is easiest. Private Sub Command1_Click() Dim strZPL As String Dim lngFileNum As Long Dim i As Long 'Loop through your excel sheet 'Assign a value to strReturn strZPL = "^XA" strZPL = strZPL & "^PF0^FS" strZPL = strZPL & "^FT150,250^A0N,244,224^FD " & strReturn & "^FS" strZPL = strZPL & "^XZ" lngFileNum = FreeFile() Open "LPT1" For Output As lngFileNum 'Open Printer.DeviceName For Output As lngFileNum 'Open "\\ARHTEST\ITTEST" For Output As lngFileNum Print #lngFileNum, strZPL Close lngFileNum 'Continue your loop End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Labelling X and Y axis | Excel Discussion (Misc queries) | |||
conditional labelling | Excel Discussion (Misc queries) | |||
Conditional formula(s) & labelling | Excel Worksheet Functions | |||
CHARTS---X-Y labelling | Charts and Charting in Excel | |||
Labelling at xy scattered chart | Charts and Charting in Excel |