You are here: DEVPPL Forum Programming Visual Basic Forum
NOTIFICATIONS
54.102
MEMBERS
15.693
TOPICS
62.279
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

Microsoft Visual Basic 2010 - Variable, Integers HELP!

0

Loading

Microsoft Visual Basic 2010 - Variable, Integers HELP!

Postby Stabby » Tue Nov 29, 2011 11:28 pm

Hi, Im trying to program a quiz for my coursework in computing at school and I have stored the Scores in a variable. I have coveniently called the variable Score, and I Dim it as Integer.

I need to make an IF statement that says, IF Score is between 1 and 4, then a MsgBox comes up saying you scored 1 - 4. But I dont know how to say IF Score is 1 - 4.

Ive tried:

IF Score = 1 - 4 THEN
MsgBox("You scored 1 - 4")

&

IF Score = 1 or 2 or 3 or 4 THEN
MsgBox("You scored 1 - 4")

&

IF Score = 1 , 2, 3, 4 THEN
MsgBox("You scored 1 - 4")
Stabby
 
Reputation: 0
Posts: 1
Joined: Tue Nov 29, 2011 11:18 pm
Highscores: 0
Arcade winning challenges: 0

Microsoft Visual Basic 2010 - Variable, Integers HELP! - Sponsored results

Sponsored results

Login to get rid of ads

 

0

Loading

Re: Microsoft Visual Basic 2010 - Variable, Integers HELP!

Postby Sanjon » Fri Dec 16, 2011 1:58 pm

Sorry for the late reply.
Here is the code:

Code: Select all
If Score >= 1 And Score <= 4 Then
MessageBox.Show("You Scored between 1 - 4")
End If


- Jonas
Sanjon
 
Reputation: 0
Posts: 40
Joined: Sun Dec 05, 2010 7:20 pm
Highscores: 0
Arcade winning challenges: 0
^ Back to Top