Re: Can .FindNext return Nothing??
- From: DecapitateSpammers@xxxxxxxxxx (Wild Bill)
- Date: Sat, 30 Apr 2005 03:02:07 GMT
Ah, very astute of you to pick that up! So c indeed could become
Nothing if c.Value is modified. Way to go! You're definitely underpaid
for what you do here :-O
It also occurred to me that break mode (i.e., stopping in Debug window)
could allow an action to result in a FindNext failure(e.g. changing
Active***), but I felt that the Nothing test in their example should
not have been written to contemplate that. Only real men would step
code, right, and they ought to be big enough to deal with such
consequences on their own time!
Now going beyond my original question, as you have established that
Nothing indeed is possible: as to kablewie, so much for left to right
evaluation in VBA - NOT! Boo! Shame on them! And since that happens, are
you saying that thus it is useless to test a range (cell) c for Is
Nothing, when c.address is in the same If? So their example should have
tested for nothing inside the loop and Exit Do, and let the While only
test the .Address?
On Fri, 29 Apr 2005 20:37:12 -0500, Dave Peterson
<ec35720@xxxxxxxxxxxxxxxxx> wrote:
>Actually, I think the xl2003's help has the opposite bug that you describe.
>
>I think that it won't wraparound to the first cell. The sample code is looking
>for "2" and changes it to "5". So after it gets all the 2's, the .findnext will
>return nothing.
>
>And that causes a blowup in this portion:
>
>Loop While Not c Is Nothing And c.Address <> FirstAddress
>
>Since c is nothing, c.address doesn't make sense (and kablewie!!!).
.
- Follow-Ups:
- Re: Can .FindNext return Nothing??
- From: Dave Peterson
- Re: Can .FindNext return Nothing??
- From: Zack Barresse
- Re: Can .FindNext return Nothing??
- References:
- Can .FindNext return Nothing??
- From: Wild Bill
- Re: Can .FindNext return Nothing??
- From: Dave Peterson
- Can .FindNext return Nothing??
- Prev by Date: add button syntax
- Next by Date: Re: Can .FindNext return Nothing??
- Previous by thread: Re: Can .FindNext return Nothing??
- Next by thread: Re: Can .FindNext return Nothing??
- Index(es):