J
james
greetings,
I have the following code and occasionally I get a 1004 runtime error
on the 'ActiveSheet.Pi...' line. I assume it is because for some
reason Excel has trouble downloading the image from the ftp site.
My real question is, can I do some kind of error checking so that if
there is this runtime error, the I can have a msgbox appear of my own
making - not the "End/Debug" message that i get with the 1004 error
(ie. i want the code to recognise the error but keep going!).
link_1 = "ftp://ftp2.bom.gov.au/anon/gen/nwp/IDYPME05/2008060512/
PMEPROB_nsw.png"
Sheets("Calc").Range("A3").Select 'select cell we want the image
to go into
ActiveSheet.Pictures.Insert(link_1).Select 'inserts image from FTP
Selection.ShapeRange.LockAspectRatio = msoTrue 'ensure aspect
ration remains the same
Selection.ShapeRange.Width = 350# 'change width to 300
Cheers,
James.
I have the following code and occasionally I get a 1004 runtime error
on the 'ActiveSheet.Pi...' line. I assume it is because for some
reason Excel has trouble downloading the image from the ftp site.
My real question is, can I do some kind of error checking so that if
there is this runtime error, the I can have a msgbox appear of my own
making - not the "End/Debug" message that i get with the 1004 error
(ie. i want the code to recognise the error but keep going!).
link_1 = "ftp://ftp2.bom.gov.au/anon/gen/nwp/IDYPME05/2008060512/
PMEPROB_nsw.png"
Sheets("Calc").Range("A3").Select 'select cell we want the image
to go into
ActiveSheet.Pictures.Insert(link_1).Select 'inserts image from FTP
Selection.ShapeRange.LockAspectRatio = msoTrue 'ensure aspect
ration remains the same
Selection.ShapeRange.Width = 350# 'change width to 300
Cheers,
James.