Image Control Problem – Can’t LoadPicture() from URL
Most web services I’ve played with don’t return images themselves, they return the url address of the image. So having a robust image control that I can drop on to my spreadsheet and manipulate at run time, to load an image from a URL, is almost mandatory.
Is this currently missing from Excel, or is it a bug with the current image control, or did I just overlook something? Here’s the problem:
Inserting a picture from a url at run time is a breeze:
ActiveSheet.Pictures.Insert( _ "http://www.automateexcel.com/media/msftstock.gif").Select
But who wants to just insert the image, which doesn’t have many options, I want a control, so I add an Image control from the VB toolbox called Image1 and use the standard code found on 50 or so websites:
Sheet1.Image1.Picture = LoadPicture( _ "http://www.automateexcel.com/media/msftstock.gif")
ERROR!!! A 10 minute project turned into an hour and a half of researching to no avail. And to add insult to injury, F1 help for Image control, a control that’s been around 9 or so years looks like this:
No wonder people diss on F1, the first two results are advertisements for the MS marketplace, and image control is nowhere to be found.
I did find a few hacks using api’s,sockets? and things, but that’s not acceptable. Oh well. I’ll probably see a checkbox I forgot to check in the morning LoL