Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to create qr code based on cell value in Excel?

Do you know how to create QR code based on specific cell value in Excel? This article will show you a method to achieve it in details.

Create QR code based on cell value with Barcode Control and VBA code


Create QR code based on cell value with Barcode Control and VBA code


The Barcode Control can help you quickly create QR code based on cell value in Excel. Please do as follows.

1. Open the worksheet contains the cell value you will create QR Code based on.

2. Click Developer > Insert > More Control. See screenshot:

3. In the More Controls window, check for the Microsoft Barcode Control 16.0 or Microsoft Barcode Control 15.0.

4. If you didn’t find the Barcode Control in the More Controls window or the Barcode Control does not the 16.0 or 15.0, you need to download the barcode control file by clicking this links: download barcode control. If there is Barcode Control 16.0 or 15.0 in your More Controls window, just jump to below step 10.

After downloading the file, unzip it and then update the Barcode Control with the downloaded barcode control in your Excel as follows.

5. Close all your Excel workbooks, go to the Start section, find the Excel app and right click on it, then select Run as administrator from the context menu. See screenshot:

6. In the opening User Account Control dialog box, click the Yes button.

7. Then a new workbook is created. Please click Developer > Insert > More Control. See screenshot:

8. In the More Controls window, click Register Custom button, find and select one of the downloaded qr code OCX file and then click the Open button. See screenshot:

9. Click the OK button when it returns the More Controls window to finish the Barcode Control updated. Then reopen the workbook contains the cell values you will create QR Codes based on.

10. Right click the sheet tab and click View Code from the context menu to open the Microsoft Visual Basic for Applications window. Then copy and paste below VAB code into the Code window. And finally press the Alt + Q keys to exit the Microsoft Visual Basic for Applications window.

VBA code: Create QR code in Excel

Sub setQR()
'Updated by Extendoffice 2018/8/22
    Dim xSRg As Range
    Dim xRRg As Range
    Dim xObjOLE As OLEObject
    On Error Resume Next
    Set xSRg = Application.InputBox("Please select the cell you will create QR code based on", "Kutools for Excel", , , , , , 8)
    If xSRg Is Nothing Then Exit Sub
    Set xRRg = Application.InputBox("Select a cell to place the QR code", "Kutools for Excel", , , , , , 8)
    If xRRg Is Nothing Then Exit Sub
    Application.ScreenUpdating = False
    Set xObjOLE = ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
    xObjOLE.Object.Style = 11
    xObjOLE.Object.Value = xSRg.Text
    ActiveSheet.Shapes.Item(xObjOLE.Name).Copy
    ActiveSheet.Paste xRRg
    xObjOLE.Delete
    Application.ScreenUpdating = True
End Sub

11. Click Developer > Insert > Button (Form Control) as below screenshot shown.

12. Draw a button into current worksheet. In the popping up Assign Macro dialog, select setQR in the box and then click the OK button.

13. Turn off the Design Mode by clicking Developer > Design Mode.

14. Click the button, in the opening Kutools for Excel dialog, select the cell you will create QR Code based on and click OK.

15. In the second Kutools for Excel dialog, select a cell to place the QR Code. See screenshot:

Then the QR Code will be inserted into specified cell immediately. Repeat step 14 to 15 to finish all QR Code created. See screenshot:


Office Tab - Tabbed Browsing, Editing, and Managing of Workbooks in Excel:

Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:

Click for free trial of Office Tab!

Office Tab for Excel


Related article:


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    bayu · 26 days ago
    msbcode not found
  • To post as a guest, your comment is unpublished.
    arthur · 1 months ago
    Microsoft Barcode Control 16.0 tidak nge-link..minta dong pak
  • To post as a guest, your comment is unpublished.
    Augusto · 1 months ago
    no puedo descargar Microsoft Barcode Control 16.0
  • To post as a guest, your comment is unpublished.
    febrian · 1 months ago
    MSBCODE.zip error 404 not found
    please reupload
  • To post as a guest, your comment is unpublished.
    diego · 2 months ago
    prezados, preciso de A1:A5 em um único QR, é possivel?