zombiemaster
Board Regular
- Joined
- Oct 27, 2009
- Messages
- 245
Here's an easy one (for those of you who are not ME, that is)...
I have a multi-tab workbook that includes a MASTER sheet as well as (usually) a sheet named "UNKNOWN". My code copies some data from MASTER to UNKNOWN...BUT...what happens if "UNKNOWN" isn't there? I'm sure it will crash because it can't find it, and although I've been lucky so far and it's there every time, there's no guarantee...
So - here's my existing code:
I want the code to ignore that piece if UNKNOWN isn't found as a tab name. Any thoughts on an easy simple fix?
Thanks as always,
~ZM~
I have a multi-tab workbook that includes a MASTER sheet as well as (usually) a sheet named "UNKNOWN". My code copies some data from MASTER to UNKNOWN...BUT...what happens if "UNKNOWN" isn't there? I'm sure it will crash because it can't find it, and although I've been lucky so far and it's there every time, there's no guarantee...
So - here's my existing code:
Code:
Sheets("MASTER").Select
Range("F1:H1").Select
Selection.Copy
Sheets("UNKNOWN").Select
Range("F1").Select
ActiveSheet.Paste
I want the code to ignore that piece if UNKNOWN isn't found as a tab name. Any thoughts on an easy simple fix?
Thanks as always,
~ZM~