View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Richard H[_2_] Richard H[_2_] is offline
external usenet poster
 
Posts: 8
Default "If Not.." crashes

Ben -

thank you for your prompt follow-up. I'm back from work, and have
tested further.

I tried to find out where the crash occurred, but it was difficult
to pinpoint as I was thrown out and didn't have the patience to
write down every step I took.

And I still was puzzled that the

If InStr(1, ActiveCell, "?") Then

worked, while the thing crashed when I added the "= 0". From
Sharad's response I had a feeling that my "?" might have been
interpreted as "any digit/letter", not literally as a question
mark - so I added a parameter to define the cell content as text:

If InStr(1, ActiveCell, "?", 1) = 0 Then

- and believe it or not, now it seems to work! Is this weird or as
expected?

Richard


"Ben McBen" wrote in
:

Your "= 0" should be fine - I suspect your crash is
elsewhere - have you step through to see where the lockup
happens (this is always tricky for me because I get too
optimistic and F8 away too quickly and miss the actual
culprit)


ttfn benm