Insert Picture from web 2007

smartsource

Board Regular
Joined
Dec 4, 2009
Messages
76
Need VBA help for inserting a web generated picture:

The link for the picture is: http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=TestQRCode (GoogleCharts API generating a QRCODE)

In Excel 2007 I can use the menus to insert picture and paste this link in the file name dialog and a QRCODE is generated and placed in the sheet.

Tried
Sub QR_Code()
Selection.InlineShapes.AddPicture "http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=TestQRCode", False, True
End Sub

Run time error 438


Looks like AddPicture method of Shapes with URLs is obsolete in 2007, may be the same with Pictures.Insert.
Appears Excel 2007 AddPicture no longer accepts URLs in place of local image file names.
http://support.microsoft.com/kb/928983/en-us
</pre>"To work around this issue, code the VBA macro to insert the picture as a picture fill in a shape such as a rectangle."

How do I code this work around?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,225,071
Messages
6,182,682
Members
453,132
Latest member
nsnodgrass73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top