I have the following function that was working before but now didn't work and return VALUE error
Code: Select all
Function GenerateQR(ByVal QRValue As String)
Dim myCell As Range, sURL As String
Set myCell = Application.Caller
sURL = "https://chart.googleapis.com/chart?chs=150x150&&cht=qr&chl=" & QRValue
On Error Resume Next
ActiveSheet.Pictures("MyQRCODE_" & myCell.Address(False, False)).Delete
On Error GoTo 0
ActiveSheet.Pictures.Insert(sURL).Select
With Selection.ShapeRange(1)
.Name = "MyQRCODE_" & myCell.Address(False, False)
.Left = myCell.Left + 5
.Top = myCell.Top + 5
End With
GenerateQR = ""
End Function