Excel FAQ


Office 2007,2010: I can no longer edit or modify the barcode once I close the fileLink

I created a document with the control, I save it, reopen it and I can no longer edit or modify the barcode.
This has something to do with the security settings of your Office, Excel, Access or Word installation. The ActiveX component is blocked by the security settings when opening the file.
You can change this by openning the document from a trusted location:

1. Click the Microsoft Office Button and then click on teh Options button.
2. Click Trust Center, click Trust Center Settings, and then click Trusted Location.
3. Add the path of your document file to the trusted locations.

Using the controlLink

How do I use ActiveBarcode control with Word, Excel or Access?
Please have a look at our 'Examples' section. There you'll find many step-by-step instructions that will help you. You can solve nearly all problems and automate tasks with ActiveBarcode and Visual Basic for Applications (VBA).

No modification possible?Link

I try to change the barcode but nothing happens! I can't even move or resize it. Whats wrong?
To change the barcode you must be in design mode. Use this button:Design mode to switch to design mode. Then you'll be able to change the barcode by clicking the barcode with the right mouse button.

Macro: Adding the control:Link

How can I create the barcode control using a VBA macro? For example to place a barcode on a document.
Use the following code to create a barcode at the cursors position:
 Set ab = Selection.InlineShapes.AddOLEObject(ClassType:="ACTIVEBARCODE.BarcodeCtrl.1",
FileName:="", LinkToFile:=False, DisplayAsIcon:=False)
To access the standard properties, you can use the variable ab now:
e.g. ab.width=200

To access the controls properties and methods, you have to do the following:
 With ab.OLEFormat
Set abobject = .Object
End With
abobject.Text = "987698769812"
Now you can access the properties using the abobject variable.

Change the barcode text with a VBA macroLink

How can change the coded text of the barcode inside a VBA macro?
Use the following command to change the coded text:
 ActiveDocument.Barcode1.Text = "[HierZeichen/ziffernfolge eingeben]" 

The barcode does not change in serial printing via VBALink

I would like to print barcodes in a loop with sequential numbers. On the screen the barcode is always correct, but in the print the serial number is not taken over. What can I do?
It seems the barcode is not updated. This may be a timing issue. You can make Excel to draw a new barcode by simply manipulate it, e.g. the size:

Temp = Barcode1.Width
Barcode1.Width = 10
Barcode1.Width = Temp
Well, this simply reduces the size of the control and the set it back to the original values. This forces Excel to redraw the control, and it is done correct. USe this code directly before your print command.

Barcode in a cellLink

I want to place the barcode into a cell and not as a drawing.
As far as we know, Excel cannont place a control into a cell.

But you can position the control exactly over a cell. This has the same effect. You can do this manually or use a macro for this:

' get cell size
MyHeight = Range(CurrentCell).Height
MyWidth = Range(CurrentCell).Width
MyTop = Range(CurrentCell).Top
MyLeft = Range(CurrentCell).Left

' extend cell height to 30px, change if you like
Range(CurrentCell).RowHeight = 30

' embed the control at the cell location
ActiveSheet.OLEObjects.Add(ClassType:="ACTIVEBARCODE.BarcodeCtrl.1", Link:=False _
, DisplayAsIcon:=False, Width:=MyWidth, Height:=30, Top:=MyTop, Left:=MyLeft).Select

Security messages while opening Office 2003 documentsLink

I receive security messages when opening Word or Excel documents under office 2003. Is there another possibilityto change this than lowering the security level?
Unfortunately, there is no so elegant solution for Office 2003 as for example for Office in 2007 with the trusted locations. Nevertheless, it is possible to stop the query in general for ActiveX controls in Office 2003, by inserting a key into the Windows Registry. Please note, that this solution is not only for our control but for all ActiveX controls. You would receive this warning also no longer with foreign controls!

Der Registry Eintrag lautet:

If you liked to carry out the change, please note that the update of the Registry always has a certain danger. We recommend you, to perform a data abckup before the intervention in the Registry.

Excel: Entering control codesLink

When using Excel with your barcode object - how can I enter control codes, like a Return?
Using the barcode object, you capture control codes directly by the corresponding ASCII character. So, you need to create that character directly in Excel. For this you use the function CHAR() inside your cell. To map a Return (ASCII 13) the cell content might look like this:
 ="Any kind of Text"&CHAR(13)