0% found this document useful (0 votes)
10 views2 pages

Generate QR Code in Excel VBA

Uploaded by

elvismbanze78
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Generate QR Code in Excel VBA

Uploaded by

elvismbanze78
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Sub GenererQRCode()

Dim lien As String, url As String

Dim WinHttpReq As Object

Dim tempPath As String

Dim fichier As Integer

Dim img As Picture

lien = Range("A1").Value

url = "[Link] & lien

tempPath = Environ("TEMP") & "\qr_temp.png"

Set WinHttpReq = CreateObject("[Link].5.1")

[Link] "GET", url, False

[Link]

If [Link] = 200 Then

fichier = FreeFile

Open tempPath For Binary Access Write As #fichier

Put #fichier, , [Link]

Close #fichier

Set img = [Link](tempPath)

[Link] = Range("B1").Left

[Link] = Range("B1").Top
[Link] = 150

[Link] = 150

Else

MsgBox "Erreur lors du téléchargement : " & [Link]

End If

End Sub

You might also like