The dBarcode Barcode Macros DLL uses a single data structure for holding barcode data within the library, BARCODE, and to use the structure in VBA code the structure must be defined as shown below
Private
Type BARCODE
code As Long
name1(12)
As Byte
show_text As Long
auto_parity As Long
orient As
Long
show_checkdigit As Long
nominal_size As Long
line_reduction As
Long
border_thickness As Long
fore_color As Long
back_color As
Long
ierror As Long
string1(80) As Byte
req_number As
Long
parity As Long
alphabetic As Long
length As
Long
Height As Long
subscript As Long
flags As
Long
textgap As Long
string2(80) As Byte
bearer_size As
Long
spare As Long
xunit As
Long
bxx As Long
margin_size As
Long
barratio As Long
charspacing As
Long
justification As Long
End
Type
A BARCODE structure must exist before any barcode-creating library routines are called, so your program requires a declaration such as
Dim bc as BARCODE
to appear in the program before any calls are made to the library routines.
For picture barcodes the human readable text that may appear under barcodes is generated in a font that may be specified to the DLL using a LOGFONT structure:
Private Type
LogFnt
lfHeight As Long
lfWidth As
Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As
Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As
Byte
lfPitchAndFamily As Byte
lfFaceName(32) As Byte
End Type
A LogFnt structure must exist before being used in a library call, so your program requires a declaration such as
Dim lf as LogFnt
to appear in the program before any calls are made to the library routines.
More: