Skip to main content

Posts

Showing posts from January, 2024

Create QR Codes in Excel With VBA

Need to automate the creation of QR Codes? Excel and VBA can help with that! Here's how to do it in less than 15 lines of code. What we're looking to do is have a URL in a cell and then we're going to use a function that we create in VBA call Google APIs to create the code. Here's a video that explains the whole process of creating a user defined function in VBA that will create QR Codes: Code to create QR Codes in Excel with VBA Open up your Visual Basic editor and insert the following code and then save. To call the function, type =GETQRCODES(Cell Address) where Cell Address is the address of the cell which contains a URL that you want to send your user to. Function GETQRCODES(QRCode As String)     Dim URL As String     URL = "https://chart.googleapis.com/chart?chs=100x100&&cht=qr&chl=" & QRCode     ActiveSheet.Pictures.Insert(URL).Select     With Selection.ShapeRange(1)         .Name = "QR_CODE_" & QRCode         .Left = Applic