RE: Import picture into Excel cell



I hate excel also because it makes it so difficult to do some obvious simple
taskw. I'vew been doing a lot of programming in excel VBA using the internet
explorer. I put a sample of my code below. I don't know if there is a way
with the internet explorer to copy a picture and place it on the worksheet.
I still think the way is to use the Insert Picture.

You can use this line to import a picture fro a file

ActiveSheet.Pictures.Insert( _
set MyPicture = "C:\Documents and Settings\Joel\" & _
"My Documents\MyPictures\lincoln.bmp")

Here is a JPG file I added to my worksheet from microsoft.com using the same
command

Sub AddPicture()

MyPicture = "ftp://ftp.microsoft.com/Products/Windows/"; & _
"Windowsce/007LOGO.JPG"

Set MyPict = ActiveSheet.Pictures.Insert(MyPicture)

End Sub

Here is an example of using internet explorer from Excel VBA

Sub GetZipCodes()


ZIPCODE = InputBox("Enter 5 digit zipcode : ")

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

URL = "http://zip4.usps.com/zip4/citytown_zip.jsp";

'get web page
IE.Navigate2 URL
Do While IE.readyState <> 4
DoEvents
Loop

Do While IE.busy = True
DoEvents
Loop
Set Form = IE.document.getElementsByTagname("Form")

Set zip5 = IE.document.getElementById("zip5")
zip5.Value = ZIPCODE


Set ZipCodebutton = Form(0).onsubmit

Form(0).submit
Do While IE.busy = True
DoEvents
Loop

Set Table = IE.document.getElementsByTagname("Table")
Location = Table(0).Rows(2).innertext
IE.Quit
MsgBox ("Zip code = " & ZIPCODE & " City/State = " & Location)


End Sub



"Joel" wrote:

I usually right click the picture and trhen save to a local drive. Then
import the picture into excel using menu option Insert - Picture - From file.
I think if you want to emiminate a step you can use menu Insert - Picture -
Frimn file and put the url address into the picture address. The Picture
isn't sored at the URL of the webpage put in a folder associated with the URL
address.

"Gandalf the White" wrote:

I am trying to import a picture off of the web, not data, into an Excel
cell.
When I do a New Web Query, while the table visually includes the image, the
image is not downloaded.
I think that is because the image is stored at a different URL.
When I enter the URL of the image into the cell, all I get is the URL
address.
If I double click on the cell, IE shows me the image.
So, I know the address is correct.

How do I tell Excel that I want it to download the image?

All assistance gratefully appreciated.
Gandalf


.