View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NadiaR NadiaR is offline
external usenet poster
 
Posts: 9
Default last try - do until range

I am really new to VB, what do I need to do to correct this..thanks!

Tom Ogilvy wrote:
I am trying to do a loop and i get a message box that says loop without do.


If you take the meat out of your macro and just look at the structu

Do Until Range("xcolumn" & 6) = ""
If Range("L1") = "Jan-06" Then



If Range("AE" & xrow) = "Feb-06" Then

End If

If Range("AF" & xrow) = "Mar-06" Then

Loop

End Sub

you see you have two IF statements that are never terminated with End IF.
Since you loop statement appears in the "middle" of an If statement with no
Do within the IF statement, you get the error.

I am trying to do a loop and i get a message box that says loop without do.
xrow = 5

[quoted text clipped - 63 lines]
Mar-04 221 212 212
Apr-04 180 167 167