Post in Forums
Create a Profile
Upload Pictures
Make Polls
Keep a Journal
Meet Friends
Have Fun
It's FREE!
Sign Up!
Avoid the cold & the crowds - Buy your Christmas gifts at Amazon.com
Forum Index > Computers & Internet > Programming
>> Visual basic .net help needed
Reply to Topic
Search Topic
Subscription
Author Message
New Post! Oct 03, 2009 @ 11:02:14#1
KulliK357
Clinically Sane


TFS Monkey+
44936 points


Send PM


16/M/Dingwall,Scotland, United King
Join Date: Oct 2007

IU need to input 10 single type values into an array . I need to use a loop and the values must be between 0 and 6, if they are not it should display a suitable error message and ask for the number again and then if that number is outside the range it should repeat, and so on, I can't do this, please someone help me, I'm going mental trying to do this.




I just can't stand to leave a field blank.
I still have twitter
2 minutes ago
Edited: October 03, 2009 @ 11:56
New Post! Oct 03, 2009 @ 11:59:55#2
KulliK357
Clinically Sane


TFS Monkey+
44936 points


Send PM


16/M/Dingwall,Scotland, United King
Join Date: Oct 2007

Please help me!




I just can't stand to leave a field blank.
I still have twitter
2 minutes ago
New Post! Oct 03, 2009 @ 12:40:18#3
sugarflyguy
Aye-curumba


Ogler+
24952 points


Send PM


39/M/Somewhere in the UK, United Ki
Join Date: Sep 2008

use the "FOR" loop and a certain variable example x which is an integer declared

int x=0
IF x>6 OR x<0
print error message
END IF

please don't laugh, I am trying to help here as much as poss

But I am trying to put it maybe into some kind of sense




Now with better color management profile
1 Corinthians 13
Hello, farewell to your love and soul
Hello, farewell to your SOOOOOOUUUUULLLLLL!!!! - Peter Hook 1987 Brixton Academy
On <span style='color:#cc6633;'>56 minutes ago </span>
New Post! Oct 03, 2009 @ 12:51:38#4
sugarflyguy
Aye-curumba


Ogler+
24952 points


Send PM


39/M/Somewhere in the UK, United Ki
Join Date: Sep 2008

Sorry, it is suppose to be the IF loop, not FOR was in two minds when I changed my mind again




Now with better color management profile
1 Corinthians 13
Hello, farewell to your love and soul
Hello, farewell to your SOOOOOOUUUUULLLLLL!!!! - Peter Hook 1987 Brixton Academy
On <span style='color:#cc6633;'>56 minutes ago </span>
New Post! Oct 03, 2009 @ 13:16:25#5
KulliK357
Clinically Sane


TFS Monkey+
44936 points


Send PM


16/M/Dingwall,Scotland, United King
Join Date: Oct 2007

It's cool bro, i worked it out myself, and yeah that's part of my solution which was this:

Private Sub Getdata(ByRef scores)
Dim userinput As Single
Dim x As Integer

Do
userinput = InputBox("Enter a number between 1 and 6" )
If userinput < 0 Or userinput > 6 Then
MsgBox("That's out of range, please try again" )
Else
x = x + 1
scores(x - 1) = userinput
End If

Loop Until userinput < 6 And userinput > 0 And x = 10

End Sub




I just can't stand to leave a field blank.
I still have twitter
2 minutes ago
Edited: October 03, 2009 @ 13:17
New Post! Oct 03, 2009 @ 13:22:09#6
Saegespaene
Licker of Old Wounds


TFS Monkey+
42967 points


Send PM


108/M/Im Walde, Spazieren, Connectic
Join Date: Jan 2008

Hey, Kullik! If you need more 'clues' you can always go to the source: Best of all, it is free!




On <span style='color:#cc6633;'>56 minutes ago </span>
Edited: October 03, 2009 @ 13:22
New Post! Oct 03, 2009 @ 13:25:45#7
KulliK357
Clinically Sane


TFS Monkey+
44936 points


Send PM


16/M/Dingwall,Scotland, United King
Join Date: Oct 2007

I've already got Scholar, which is written for VB6 too, although our class is taught entirely using 2008 and that's what I have




I just can't stand to leave a field blank.
I still have twitter
2 minutes ago
New Post! Oct 03, 2009 @ 13:27:24#8
Saegespaene
Licker of Old Wounds


TFS Monkey+
42967 points


Send PM


108/M/Im Walde, Spazieren, Connectic
Join Date: Jan 2008

OK! Just don't go mental, again!




On <span style='color:#cc6633;'>56 minutes ago </span>
Reply to Topic<< Previous Topic | Next Topic >>

Top

TFS Time: Sun 22 Nov 2009 11:56 am CST
Copyright © 2004-2009 Funky Llama Productions, LLC   |   Home   |   Contact   |   Privacy Policy   |   Terms of service

The Forum Site - Your premier source for everything LOGIN REGISTER