1

我继承了将运输标签打印到 Zebra s600 打印机的代码,虽然该代码在 Windows XP 中运行良好,但我不明白为什么它在 Windows 7 中无法运行。

在 Windows 7 中运行程序时出现以下错误:“运行时错误 '75' 路径/文件访问错误”

但是它运行在WindowsXP中,所以路径没有错。

编辑:我尝试在可比较模式下运行以及右键单击并以管理员身份运行程序。还是不行。

Sub PrintLabel()
'**** this sub print a barcode label on the Zebra S600 printer
'**** for the cardboard shipping box.
Dim mySNprinter As String

mySNprinter = GetSetupVariable("TestSnPrinter")

If (mySNprinter = "") Then
    mySNprinter = "\\dc1\bertha"
End If

 Open mySNprinter For Output As #3
    Print #3, "^XA"         'start of data
    Print #3, "^LH20,25"    'home position of label is 5,25
    If optSize(0).Value = True Then
        Print #3, "^FO1,30^A0,N,25,25^FD" & cboLabel.Text & "^FS"    'print MP-1 with the D font
    End If
    If optSize(1).Value = True Then
        Print #3, "^FO1,30^A0,N,35,35^FD" & cboLabel.Text & "^FS"    'print MP-1 with the D font
    End If
    If optSize(2).Value = True Then
        Print #3, "^FO1,30^A0,N,50,50^FD" & cboLabel.Text & "^FS"    'print MP-1 with the D font
    End If
    Print #3, "^XZ"                     'end data
 Close #3
4

0 回答 0