Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Handling | Excel Programming | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Error handling with a handling routine | Excel Programming | |||
error handling off?? | Excel Programming | |||
error handling | Excel Programming |