Error Handler
On Wed, 18 Aug 2004 16:47:01 +0100, dht wrote:
I have tried this and it doesn't appear to work I'm using Excel 2000 if this
helps.
Dave
So am I. Here's what I used; works just fine for me (modified a bit for
my system):
Sub Section_1()
On Error GoTo Handler
'...code...
Exit Sub
Handler:
Cells.Select
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Range("G6").Select
ActiveSheet.Pictures.Insert _
("c:\documents and settings\auric\desktop\223.jpg").Select
Selection.ShapeRange.IncrementLeft 14.25
Selection.ShapeRange.IncrementTop -58.5
End Sub
I just noticed that your picture seems to have an invalid path. You have
"\\\files etc pics \logo.jpg" as the path; there should not be three
backslashes, either one or two. I imagine that's a relative path, right?
(As opposed to another computer on the network.) Also, "files etc pics"
probably doesn't end with a space. Try changing it to "\\files etc
pics\logo.jpg" or "\files etc pics\logo.jpg" or even
"\files\etc\pics\logo.jpg" and see what happens.
--
auric underscore underscore at hotmail dot com
*****
What? Boo is outraged! See his fury! It's small, so look close. Trust
me, it's there.
|