An Active Barcode Control may be placed on an Excel worksheet by selecting the More Controls icon in the toolbox (which, if not visible, can be displayed by checking the Controls Toolbox member of the View – Toolbars menu) and choosing Active Barcode Control from the list of Object types available. In Excel 2007 the toolbox appears under the Insert icon of the Developer toolbar. To make the Developer toolbar visible select the Office icon, choose Excel Options and in the Popular pane check the checkbox labelled “Show Developer tab in the ribbon”.

The default barcode image is displayed. Right click on the image and choose Properties from the pop-up menu.

The Properties box shows the current properties of the barcode which may be edited as required – including the Caption property which sets the barcode data and the Linked Cell property which allows the barcode data to be taken directly from the contents of a cell on the worksheet.

Note that the control can be selected and its properties displayed only when Excel is in Design mode. Design mode may be turned on or off using the top left-hand icon of the Control toolbox (or the Design mode icon in Office 2007).
The sample spreadsheet ActiveDemo2003.xls also contains two demonstration macros. DoBarcodes copies pictures from the Active Control to positions on the spreadsheet overlaying column B. DoLabels prints 3 labels from Sheet2, where an Image is replaced by a barcode for each label.
More: