Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to deal with an error question
Hi all;
How do I catch an error on ChDir "C:\Documents and Settings\me\Desktop" Workbooks.Open Filename:="Some_file.xls" ? If the some_file.xls is cancelled ( because it is password protected ) I get a "run time error" from the debugger. So how can I deal with this in a proper manner? Regards Ian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to deal with an error question
Try something Like this...
Public Sub Whatever() On Error Goto ErrorHandler 'insert your code here... exit sub ErrorHandler: msgbox "Oh Darn" resume next End Sub "Ian Pellew" wrote: Hi all; How do I catch an error on ChDir "C:\Documents and Settings\me\Desktop" Workbooks.Open Filename:="Some_file.xls" ? If the some_file.xls is cancelled ( because it is password protected ) I get a "run time error" from the debugger. So how can I deal with this in a proper manner? Regards Ian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
To deal with #NA | Excel Worksheet Functions | |||
Has anyone made a Deal or No Deal Gamebord | Excel Discussion (Misc queries) | |||
can Excel really deal with elapsed time? | Excel Discussion (Misc queries) | |||
What's the deal here? thanks | Excel Discussion (Misc queries) | |||
How to deal with a growing dataset... | Excel Discussion (Misc queries) |