FAQ TBarCode OCX
如何通过 Excel VBA 设置 ITF-14?
如何通过 Excel VBA 设置 ITF-14?
使用以下代码,您可以为 ITF-14 设置支持线和静区。
Me.TBarCode111.BarCode = eBC_ITF14 Me.TBarCode111.QuietZoneUnit = eMUModules Me.TBarCode111.QuietZoneLeft = 10 Me.TBarCode111.QuietZoneRight = 10 Me.TBarCode111.BearerBarType = eBearerBar_TopAndBottom Me.TBarCode111.Text = "0123456789123" Or Me.TBarCode111.LinkedCell = "A1"
获取单元格坐标:
With Selection
X = .Cells(1, 1).Left
Y = .Cells(1, 1).Top
MsgBox "X = " < X < vbNewLine < "Y = " < Y
End With
设置条码位置:
Me.TBarCode111.Left = X Me.TBarCode111.Top = Y