Do Until... Loop

smiler44

Registered User.
Local time
Today, 08:34
Joined
Jul 15, 2008
Messages
671
I'm getting a "complie error, Loop with out Do" message.

I'm sure I have the Loop where I want it but it is contained within an If statement and I think this is the problem. At the moment I can not find a way around the problem



Code:
counter1 = 0
 
Do Until counter1 = 2
   If counter1 = 0 Then
   oucsigchars = 3
   Else
   oucsigchars = 4
   End If
 
do stuff using oucsigchars
 
If OutputDataCol = 14 Then
 counter1 = counter1 + 1
 Loop

smiler44
 
You are lacking an "End if" for your "If OutputDataCol = 14 Then"

This error will occur for both missing Endif s and Loops...
 
namliam,
Thanks but I have just left out the End If in the example.
smiler44
 
Well appart from the syntax that is slightly wrong, the error should point to some If/then/else/endif missing or some do/loop or For/Next etc...

Try fixing the syntax first though... the proper syntax is either:
Do while ...
Loop
Or it is:
Do
Lood untill ....
 

Users who are viewing this thread

Back
Top Bottom