LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error Handling - Did i do it correct


Hi All,

I know error handling can be tricky.
So i have this in some code i am working on. i just want to make sure i
am doing it correctly.

I have this at the very top:

Code:
--------------------
On Error GoTo ErrHandler:
--------------------


This is at the very bottom"

Code:
--------------------
Exit Sub
ErrHandler: ActiveSheet.Protect
MsgBox ("You did not open ''UCPSITE-06.xls''")
--------------------

This code is copying data from another open workbook, then pasting into
this one.
If the other workbook is not open, i want to exit sub and show message
box.

It seems to be working, but i wanted to get a guru's opinion.


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=560960

 
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
Error Handling JT Excel Programming 1 April 6th 06 03:20 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05:59 PM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM
error handling off?? Tom Ogilvy Excel Programming 0 August 19th 04 04:31 PM
error handling jeffP Excel Programming 1 July 3rd 04 06:10 PM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"