FAQ TBarCode OCX
How Can I Setup ITF-14 via Excel VBA?
How Can I Setup ITF-14 via Excel VBA?
With the following code you can adjust ITF-14 with a bearer bar and a quiet zone.
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"
Get coordinates of cell:
With Selection
X = .Cells(1, 1).Left
Y = .Cells(1, 1).Top
MsgBox "X = " < X < vbNewLine < "Y = " < Y
End With
Set the bar code position:
Me.TBarCode111.Left = X Me.TBarCode111.Top = Y