![]() |
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. |
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. |
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 ! |
All times are GMT +1. The time now is 01:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com