Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On error resume next problem freekrill Excel Discussion (Misc queries) 2 December 7th 05 12:51 AM
EnableCancelKey with On Error Resume Next Paul S[_3_] Excel Programming 2 May 1st 04 10:22 AM
ON ERROR RESUME NEXT D.S.[_3_] Excel Programming 7 December 1st 03 09:40 AM
On Error Resume Next D.S.[_3_] Excel Programming 1 November 28th 03 04:52 PM
On Error Resume Next Mike[_58_] Excel Programming 3 November 23rd 03 05:09 PM


All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"