#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Error Trapping

Can someone tell me why the following falls over with a runtime error
when the clipboard is empty (ie I do not get the msgbox)

On Error Resume Next
ActiveSheet.Paste
If Err Then MsgBox "Nothing to paste!": Err.Clear

Thanks,
Gary

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Error Trapping

Do you have Break on All Errors set under Tools, Options, General in the
VBE?

--
Jim
"gazza67" wrote in message
ups.com...
| Can someone tell me why the following falls over with a runtime error
| when the clipboard is empty (ie I do not get the msgbox)
|
| On Error Resume Next
| ActiveSheet.Paste
| If Err Then MsgBox "Nothing to paste!": Err.Clear
|
| Thanks,
| Gary
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Error Trapping

That was it, Thanks so much!!

Gary



On Sep 7, 2:44 am, "Jim Rech" wrote:
Do you have Break on All Errors set under Tools, Options, General in the
VBE?

--
Jim"gazza67" wrote in message

ups.com...
| Can someone tell me why the following falls over with a runtime error
| when the clipboard is empty (ie I do not get the msgbox)
|
| On Error Resume Next
| ActiveSheet.Paste
| If Err Then MsgBox "Nothing to paste!": Err.Clear
|
| Thanks,
| Gary
|



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
Trapping #VALUE! error RhysPieces Excel Discussion (Misc queries) 6 August 22nd 07 03:13 AM
trapping charts event PLP Charts and Charting in Excel 2 June 21st 07 01:18 AM
Error Trapping from WSH Tom Chau Excel Discussion (Misc queries) 1 August 25th 06 04:21 AM
error trapping flow23 Excel Discussion (Misc queries) 3 April 13th 06 04:51 PM
trapping for printer problems TAndrew Charts and Charting in Excel 0 December 22nd 05 09:11 PM


All times are GMT +1. The time now is 07:50 PM.

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"