Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Error Resume Next
On Error Resume Next
Set p = ActiveSheet.Pictures.Insert(strPicRef) When I access a picture that I cannot open, the above gives me run time error 1004 via the debug dialogue box and no means of trapping the error. Any idea why ? Thanks, Jim. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Error Resume Next
Jim,
What do you mean by 'cannot open'. I tried it with a file that didn't exits, and it went ok. B TW I declared p as a Picture object. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim Sharrock" wrote in message ... On Error Resume Next Set p = ActiveSheet.Pictures.Insert(strPicRef) When I access a picture that I cannot open, the above gives me run time error 1004 via the debug dialogue box and no means of trapping the error. Any idea why ? Thanks, Jim. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Error Resume Next
I have a .eps file that I cannot open within a macro. I have lots that I can
and I am trying to give the user a more meaningful message other than "Run time error '1004', unable to get the insert property of the picture class". I thought that if I placed 'On Error Resume Next' before the command that is giving rise to the error I could display my own 'stuff' but no, it still displays the standard run time error... I have just had a thought, I set 'Break on all errors' so that I could trap the error in debug, I've set that off and all's ok. Cheers Bob. Hope the weather's fine in Poole today ! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
On error resume next problem | Excel Discussion (Misc queries) | |||
EnableCancelKey with On Error Resume Next | Excel Programming | |||
ON ERROR RESUME NEXT | Excel Programming | |||
On Error Resume Next | Excel Programming | |||
On Error Resume Next | Excel Programming |