Function QRCodeToCell(Chaine As String, _
Cellule As Range, _
Optional PicWidth As Integer = 120, _
Optional PicHeight As Integer = 120) As Picture
Dim Link As String
Dim Pic As Picture
Dim PicName As String
'https://developers.google.com/chart/infographics/docs/qr_codes
Link = "http://chart.googleapis.com/chart?cht=qr&chs=" & PicWidth & "x" & PicHeight & "&chl=" & Chaine
Windows(Cellule.Parent.Parent.Name).Activate
Cellule.Parent.Activate
Cellule.Activate
PicName = "QRCode_" & Cellule.Address(0, 0)
'Supprime une Shape de ce nom éventuellement présente
For Each Pic In ActiveSheet.Pictures
If Pic.Name = PicName Then Pic.Delete
Next Pic
'Génère l'image QR Code
Set Pic = ActiveSheet.Pictures.Insert(Link)
Pic.Name = PicName
Set QRCodeToCell = Pic
End Function