|
-
Feb 18th, 2006, 06:37 AM
#1
Thread Starter
Member
[RESOLVED] Problems with CASE Statements
Ok I have a CASE statement in my program and I want to add to conditions onto the end of each selection but for some reason it wont let me.
Here's my code just now
VB Code:
Select Case ButtonCounter
Case 1
Call Question1
Case 2
Call Question2
Case 3
Call Question3
.... etc
End select
I would LIKE it to look like this
VB Code:
Select Case ButtonCounter
Case 1
Call Question1 [B]And icorrect = 2[/B]
Case 2
Call Question2 [B]And icorrect = 3[/B]
Case 3
Call Question3 [B]And icorrect = 1[/B]
.... etc
End select
For some reason it doesn't like this though and says that there is an "expected end of statement".
Can someone help me to get this to work?
Thanks.
-
Feb 18th, 2006, 06:41 AM
#2
Re: Problems with CASE Statements
Do you mean
VB Code:
Case (1 And iCorrect = 2)
?
-
Feb 18th, 2006, 06:43 AM
#3
Thread Starter
Member
Re: Problems with CASE Statements
 Originally Posted by penagate
Do you mean
VB Code:
Case (1 And iCorrect = 2)
?
Thanks, but it doesn't say to call question one which I need it to do.
-
Feb 18th, 2006, 06:44 AM
#4
Re: Problems with CASE Statements
Well I left it out... can't you add it yourself?
-
Feb 18th, 2006, 06:49 AM
#5
Thread Starter
Member
Re: Problems with CASE Statements
No sorry I get what you mean now, that does work.
Thanks. 
Noob talking
-
Feb 18th, 2006, 06:52 AM
#6
Re: Problems with CASE Statements
No worries. 
Remember to mark your thread as resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|