Insert picture from web URL: Runtime error 1004

flight32

New Member
Joined
Mar 6, 2014
Messages
3
Hi :)

I am trying to insert a picture from a website into an excel sheet, but I get an error message, no matter which method I try.

The URL I use ("MyURL") is in the format:
https://x.x.x.x:pppp/chart.png?id=1002&graphid=2&mapid=secretkey

But if I use any other picture url, it works... even if it has parameters, eg.
http://www.mrexcel.com/forum/avatars/[personsname].gif?dateline=2007

MyUrl works fine in any browser, but not in Excel.

I have used these methods:

A) Pictures.Insert

ActiveSheet.Pictures.Insert ("MyURL")

* gives error: "Runtime error 1004: Unable to get the Insert property of the Pictures class"

B) Shapes.AddPicture

wsht.Shapes.AddPicture "MyURL", msoFalse, msoTrue, 0, 0, 100, 100

* gives error: "Runtime error 1004: The specified file was not found"

C) Insert > Pictures > Paste URL in file name

* I get the message "An error occurred while importing this file"

D) Convert MyUrl into a short URL
* I get the error messages:
A - "Insert method of picture class failed"
B - "The specified file was not found"
C - "An error occurred while importing this file"

My system:
Windows 8, Excel 2013

What is the problem?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Weird... it suddenly works. Just used the simple command (as before):
ActiveSheet.Pictures.Insert ("copy paste URL here")
:confused:
 
Upvote 0
Okay, it stopped working again... don't know why... did not change anything. It may be because the site issues different ID's ?
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,852
Members
449,194
Latest member
HellScout

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