You might have a need to generate QR codes for your application. Here is one way to do so.
You've seen these all over the place. I see them at bus stops, on billboards and flyers:

I guess they're supposed to mean something. QR-Server has a free API for creating these images. All we need to do is call the following URL:
http://api.qrserver.com/v1/create-qr-code/
Two parameters are required: size and data
So a sample API call looks like this:
http://api.qrserver.com/v1/create-qr-code/?size=200x200&data=Example
The value for the data parameter is supposed to be urlencoded, but it didn't seem to make a difference when I tested it. Then again, these images all look the same to me.
Sample UserForm
I created a sample userform for creating your own QR codes. You specify the size (up to 200px) and the text you want, and it displays the QR code in a WebBrowser Control.
The control changes size depending on the size of the image, however to be practical it will not go above 200px.
Here's how it looks when I use the name of this website:

This is what happens when you press the Get QR Code button:
Private Sub GetQR_Click()
On Error GoTo ErrorHandler
Dim url As String
Dim size As String
Dim text As String
Dim windowSize As Long
size = Me.SizeText.Value
text = Me.TextValue.Value
If LenB(text) <> 0 Then
url = Replace(url, "Example", URLEncode(text))
Else ' no text, exit
GoTo ProgramExit
End If
' default window size and url
windowSize = 210
url = BASE_URL
If LenB(size) <> 0 Then
If IsNumeric(size) Then
If CLng(size) <= 200 Then
url = Replace(BASE_URL, "200", size)
windowSize = CLng(size) + 10
End If
End If
End If
With Me.WebBrowserCtl
.Height = windowSize
.Width = windowSize
.Navigate url
End With
ProgramExit:
Exit Sub
ErrorHandler:
MsgBox Err.Number & " - " & Err.Description
Resume ProgramExit
End Sub
Thanks for the post, your sample spreadsheet vba code has an error. the statement "url = BASE_URL" is in the wrong place, it keeps resetting the text back to "Example", move it up above the "url = Replace(url, "Example", URLEncode(text))" . That is why all of the QR codes look the same… Thanks!
Thank you, I did a lot of cutting and pasting in that procedure, I must have messed it up. I thought I debugged it but I guess not! I'll update the workbooks and upload them again shortly.