An Aztec barcode example

Aztec Code in Microsoft Excel

An example how to use StrokeScribe barcode generator to make Aztec barcodes in Excel.

Requirements

Generating an Aztec barcode in Excel requires specialized tools, as Excel doesn’t natively support barcode creation. To generate an Aztec barcode, you can use our specialized 2D barcode font or the ActiveX-based barcode generator.

Once the barcode generator is installed, you can create an Aztec barcode by inputting the data you wish to encode into a designated cell, then linking the barcode generator to the cell.

After the barcode is generated, you may need to adjust the size of the cell and apply formatting to ensure the barcode is clearly visible and scannable.

There are many additional customization options, such as adjusting the barcode’s error correction level or specifying the data encoding format. With the correct setup and attention to formatting, Excel can become a practical tool for creating Aztec barcodes for use in various applications.

Placing Aztec Code in Excel Using Active Document

1. Switch to the Insert tab on the Excel Ribbon and click Object.

2. Look for the StrokeScribe Document in the list of available objects:

Inserting a barcode in Excel as an Active Document

3. Right-click the barcode object, select StrokeScribe Control->Properties from the context menu.

Setting up an Aztec barcode in Excel

Aztec Code Customization

Switch to the Code-specific 2 tab in the barcode properties dialog.

Here you can configure the error correction level and fix the minimum matrix size.

Customizing the Aztec barcode

How to Remove a Border Around the Barcode

Use this example from the Excel barcode generation guide.

Placing an Aztec Barcode in Excel Using ActiveX

1. Switch to the Developer tab on the Excel Ribbon and click Insert->More Controls as shown below.

2. Select StrokeScribe Control from the list of available objects and press OK:

Inserting a barcode in Excel as an ActiveX

3. Click anywhere on the worksheet to insert the barcode object.

4. Activate the Design Mode button on the Developer tab.

4.1. Right-click the barcode object, select Properties or activate the Properties button on the Ribbon:

The Properties button in Excel

5. Use the property list to customize your barcode. To create an Aztec barcode, modify the following properties:

The barcode object's property list

Linking the Aztec Barcode Object to a Cell

To automatically update the barcode when a cell content changes, use the linked cell technique.

Aztec Barcode Customization with VBA

1. Press Alt+F11 to open VBA window. Double-click the current worksheet name in the VBA project tree:

Aztec code customization - opening VBA editor

2. Paste the following code into the VBA editor:

Sub CreateAztec() StrokeScribe1.Alphabet = AZTEC StrokeScribe1.Text = "ANY TEXT" ' Optional barcode parameters: StrokeScribe1.AztecECL = 50 StrokeScribe1.AztecMinLayers = 30 StrokeScribe1.QuietZone2D = 1 StrokeScribe1.FontColor = RGB(0, 0, 255) StrokeScribe1.Rotation = 90 End Sub

3. Place the caret into the CreateAztec() Sub body, press F5 to run the code and switch back to the Excel window to enjoy the barcode.

To encode data from a cell, use the following code:

StrokeScribe1.Text = Range("A1")

To encode a byte array, use the following code:

StrokeScribe1.Alphabet = AZTEC StrokeScribe1.CodePage = -1 Dim b(1 To 3) As Byte b(1) = &H1 b(2) = &H2 b(3) = &H3 StrokeScribe1.Text = b