Engineer Joe
Well-known Member
- Joined
- Jun 10, 2005
- Messages
- 549
hey you old crusty VBA veterans...here's an easy one for you...
I execute a find procedure on a worksheet, and try to name the range (lets call it "Body") that it finds...like so:
My question is: what happens when nothing is found? Body has already been defined as a range. But an error is not generated...Not until i try to use Body. I guess what i'm getting at is that i'd like to insert some code that either notifies me, or skips over any arguments that try to use that range after it misses. But I don't know how? Any tips? I love you. I mean, I would be appreciative...
I execute a find procedure on a worksheet, and try to name the range (lets call it "Body") that it finds...like so:
Code:
Set Body = .find(blah,blah,blah)
My question is: what happens when nothing is found? Body has already been defined as a range. But an error is not generated...Not until i try to use Body. I guess what i'm getting at is that i'd like to insert some code that either notifies me, or skips over any arguments that try to use that range after it misses. But I don't know how? Any tips? I love you. I mean, I would be appreciative...