Jump to content
Sign in to follow this  
darkmaster071

Help with a loop

Recommended Posts

darkmaster071

When i put an If statement in the While, Wend loop it gives me this error: "Wend" statement with no matching "While" statement.: Why isnt it letting me to have If? How do i fix this. Help please.

Share this post


Link to post
Share on other sites
Mat

When i put an If statement in the While, Wend loop it gives me this error: "Wend" statement with no matching "While" statement.: Why isnt it letting me to have If? How do i fix this. Help please.

no endif probably - post code for a more specific answer. That error usually occurs when you do something like this:

While 1
If 1 = 2 Then
MsgBox (48, "Test", "If this message actually shows, you have 1 weird computer")
Wend

you need

While 1
If 1 = 2 Then
MsgBox (48, "Test", "If this message actually shows, you have 1 weird computer")
ENDIF
Wend
Edited by mdiesel

Share this post


Link to post
Share on other sites
CodyBarrett

or do this..

While 1
If 1 = 2 Then MsgBox (48, "Test", "If this message actually shows, you have 1 weird computer")
Wend

Share this post


Link to post
Share on other sites
darkmaster071

I had ElseIf and not EndIf. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×