JasonEnsor
Programmer
Hi Guys,
A lot of my projects pass data between workbooks, however the project I am working on at the moment is possibly the worst for it. How can I ensure that if an error occurs the external workbook closes and my current workbook activates on the desired sheet? The issue is sometimes an error occurs in workbook x and then my application tries to access a range in workbook x as it is active but it should be looking for a range in workbook y which is where the macro is actually running. Error handling in VBA is quite new to me and so far I have gotten away without using it, but as my skills improve my projects are getting more complex and so I think it's time I start using error handling.
Any tips would be appreciated on how to tackle this one
Regards
Jason
A lot of my projects pass data between workbooks, however the project I am working on at the moment is possibly the worst for it. How can I ensure that if an error occurs the external workbook closes and my current workbook activates on the desired sheet? The issue is sometimes an error occurs in workbook x and then my application tries to access a range in workbook x as it is active but it should be looking for a range in workbook y which is where the macro is actually running. Error handling in VBA is quite new to me and so far I have gotten away without using it, but as my skills improve my projects are getting more complex and so I think it's time I start using error handling.
Any tips would be appreciated on how to tackle this one
Regards
Jason