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 using the same

Sub AddPicture()

MyPicture = ""; & _

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 = "";

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

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

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

Set ZipCodebutton = Form(0).onsubmit

Do While IE.busy = True

Set Table = IE.document.getElementsByTagname("Table")
Location = Table(0).Rows(2).innertext
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

"Gandalf the White" wrote:

I am trying to import a picture off of the web, not data, into an Excel
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
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.


Relevant Pages

  • Re: Using Excel Data in Word Dynamically
    ... open Excel to a blank workbook. ... > What we have now is a live Word document living on an Excel worksheet. ... A picture of the cell range you selected will appear. ...
  • Re: Excel and Outlook Email
    ... I guess the short-term solution regarding the picture is to ... >Dim olRecip as Outlook.Recipient ... > For Each cell In ActiveSheet.Range.Cells ... >Excel Blog - Daily Dose of Excel ...
  • Re: Photos in cells?
    ... Click that cell and select one of the items. ... 5)WITH THE PICTURE SELECTED, ... Microsoft MVP (Excel) ... What i dun understand is how do I build the data validation list on a cell ...
  • RE: Text Orientation?
    ... In Excel, make the cell containing our text the active cell and then press ... Shift then click Edit + Copy Picture; in the dialogue that appears, ...
  • Associating Cell with Background Image
    ... Can I make Excel relate a color in a picture to a cell? ... Microsoft Excel recognizes every cell as being blank in both cases. ...