View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Stop the macro at the end of a certain column #2

It could be that you need a brief delay just after that statement to give the
Exit For
time to work. Try inserting this snippet in just after the if statement:

s = Timer + 0.5
Do While Timer < s
DoEvents
Loop

That will give it a half second delay. If it still don't exit, I have no
other guesses.


"Carrie_Loos via OfficeKB.com" wrote:

Thanks and you are right I forgot to change the range back to AU65535.
However it still did not solve my problem. The statement does not recognize
that it is on that address and I just don't get it.

As well as:
It seems to be the "Find" portion that will not stay within the set range as
I have it written but I also have to find each occurance of the 1's and 2's
to do a datafill iinbetween them which doesn't work any other way that I have
found (excluding the previous answer which I have not disected yet)


JLGWhiz wrote:
Set r = ActiveSheet.Range("E3:AU65534")

If you want c to reach AU65535 then you will have to change the range for r.
See above. You can either change that range to E3:AU65535 or change the If
statement to: If c.Address = "AU65534" Then

Same problem skip right to End If

[quoted text clipped - 8 lines]
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200801/1


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200801/1