jo15765
Well-known Member
- Joined
- Sep 23, 2011
- Messages
- 591
I have never done any error handling, I would always just let the code crash, and pick up the pieces after the fact. Well this time I am going to try to add error handling, and what my thoughts are is to have the code say on error jump to the next and then show a log at the end of what failed. For example..
And of course some of the array's are more complex and that is just a snippet. I was thinking something along the lines of if Today doesn't exist or a problem opening that, then proceed to Yesterday and then show me a log at the end of what the error(s) are.
Is that a feasible mindset or am I way out in left field? Also, how difficult would that be to code?
Code:
Workbooks.Open Filename:="C:\JJones\Daily\Daily.xls"
With Sheets(Array("Today", "Yesterday")).Select
And of course some of the array's are more complex and that is just a snippet. I was thinking something along the lines of if Today doesn't exist or a problem opening that, then proceed to Yesterday and then show me a log at the end of what the error(s) are.
Is that a feasible mindset or am I way out in left field? Also, how difficult would that be to code?