
Making QR Code in Microsoft Excel
Some examples how to use StrokeScribe barcode generator to make QR Code in Excel. The Active Document is the easiest one but allows less customization. The ActiveX-based method is VBA friendly.
For more methods, look in the Related Tutorials.
The examples work with all Excel versions starting from Excel 2007 (excluding online version of Office).
QR codes are a type of matrix barcode that can store various types of data, such as URLs, text, or contact information, and can be scanned using a mobile device.
Requirements
- Download and install the barcode generator
Placing QR Code in Excel as an 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:

3. Right-click the barcode object, select StrokeScribe Control->Properties from the context menu;
Go to the General tab in the barcode properties dialog;
Set Alphabet = QRCODE;
Type any text in the Text field.

QR Code Customization
Switch to the Code-specific 2 tab in the barcode properties dialog.
Here you can set the error protection level and minimum size of the QR CODE matrix.

Micro QR Code
To create a MICRO QR code, set the Alphabet property as shown on the picture:

Placing QR Code in Excel as an 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:

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:

5. Use the property list to customize your barcode. To create a QR CODE, modify the following properties:
- Alphabet = QRCODE (or MICROQR if you need MicroQR code);
- Text = any text you want to encode in the barcode.

You also may want to use the following properties:
- QrECL - the error correction level;
- QrMinVersion - the minimum size of the barcode matrix;
Linking QR Code to a cell
To automatically update the barcode when a cell content changes, use the linked cell technique.
In Excel, binding a QR code object to a cell can be achieved using the "LinkedCell" property, which allows the value of a form control or object to be tied directly to the contents of a specific cell.
For instance, when generating a QR code in Excel, the QR code object can be linked to a cell so that the QR code dynamically updates whenever the value of the linked cell changes. This is particularly useful when working with data that frequently changes.
By setting the LinkedCell property, the QR code image will reflect the current value in the specified cell, ensuring that the generated QR code is always up to date with the cell's content.QR Code Customization with VBA
1. Press Alt+F11 to open VBA window. Double-click the current worksheet name in the VBA project tree.

2. Paste the following code into the VBA editor:
Sub CreateBarcode()
StrokeScribe1.Alphabet = QRCODE
StrokeScribe1.Text = "1234ABC" ' Any text to encode in the QR Code
' Optional QR Code parameters:
StrokeScribe1.Rotation = 90
StrokeScribe1.QrECL = Q ' Error correcion level
StrokeScribe1.QrMinVersion = 10 ' Minimum barcode matrix size
End Sub
3. Place the caret into the 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")
In Excel, QR codes can be generated using VBA (Visual Basic for Applications), that allows users to automate tasks and create custom functions. By writing a VBA script, users can generate QR codes directly within Excel by utilizing StrokeScribe barcode generator that creates QR Codes from the data in a specific cell.
This integration allows for easy management and sharing of information in a digital format, making Excel a powerful tool not only for data analysis but also for automating the creation of QR codes for quick access to information.
Related Tutorials
- Barcode in Microsoft Excel
- Using Formula to Create Barcode in Excel
- Using DLL version of the barcode generator in Excel
FAQ: Creating QR Codes in Excel
Q1: How do I create a QR code in Excel?
To create a QR code in Excel, you may use our ActiveX or Office Ribbon Add-in. Excel doesn’t have a built-in feature for generating QR codes.
Q2: How do I customize the QR code in Excel?
The level of customization depends on the typa of the barcode generator you’re using. In most cases, you can:
- Dynamically change the content to generate new QR codes.
- Adjust the size of the QR code by resizing the image.
- Choose the desired error correction level for the QR code.
- You may change the color of QR code.
Q3: Can I generate QR codes for multiple cells at once?
Yes, the formula-based approach allows you can generate multiple QR codes at once. Also, by linking the ActiveX-based QR code generator objects to cells you may create multiple dynamic QR codes.
Q4: Can I scan a QR code directly from Excel?
No, Excel does not have the built-in capability to scan QR codes. However, you can use a smartphone with a QR code scanner to scan codes that have been inserted into Excel. Also, you may use the serial port ActiveX control to read data from a handleld barcode scanner.
Q5: Are you providing any free tools for creating QR codes in Excel?
No. We provide commercial tools for QR code generation. You may try free demo versions of these tools. The tools are completely offline, i.e. they don't need Internat connection to create QR codes.
Q6: Can I use Excel to create a batch of QR codes for addresses or product codes?
Yes, you can create a batch of QR codes in Excel by using our formula-based example and COM-version of our QR code generator. This feature allows to generate QR codes for multiple rows or columns at once.
Q7: Can I automate QR code generation in Excel?
Yes, using VBA (Visual Basic for Applications), you can automate QR code generation in Excel. By using our COM- or DLL- versions of the barcode generator for QR code generation you can write a VBA script (see the examples above) to create QR codes automatically based on cell data.
Q8: What types of data can I turn into a QR code in Excel?
You can create QR codes for various types of data, such as:
- URLs
- Text
- Contact information (vCards/business cards)
- Emails
- Phone numbers
- Wi-Fi network credentials
- Any binary data
Q9: Is there a limit to the size or number of QR codes I can create in Excel?
There is no strict limit imposed by Excel. But, if you are trying to ues ActiveX objects to create QR codes, we do not recommend to create more than 1000 objects.
The font-based method QR code generation or methods provided by COM- and DLL- versions of our QR code generator allow to create an unlimited number of QR codes on a single Excel's worksheet.
Q10: Can I create dynamic QR codes that update automatically when data in Excel changes?
Use our formula-based example to create QR codes or link an ActiveX instance of the barcode generator to a cell using the LinkedCell property.
Q11: Why is my QR code not scanning properly?
If your QR code isn't scanning correctly, check the following:
- Resolution: The QR code should not be too small. Ensure it’s large enough for scanners to recognize.
- Content: Ensure the data encoded in the QR code is valid and properly formatted.
- Placement: Avoid placing QR codes near the edges of the page or too close to the surrounding content.