|
-
May 1st, 2007, 05:49 PM
#1
Thread Starter
Lively Member
[RESOLVED] code question
i have 5 textboxes and they are set as arrays. i had a random number generator. when you guess i want the first guess in the first textbox..when you guess again i want the second guess to go into the second textbox and so on..how could i do this? can you use ForNext loops? THANK YOU
-
May 1st, 2007, 05:58 PM
#2
Re: code question
You should think out a pseudo-code first, it will make things alot easier...
Then, just give it a shot and try it... if it doesn't work, show us your code and we can help you improve it.
For now, your pseudo-code could look something like:
- Create an array (variable) that can hold your 5 random numbers
- Generate the random numbers and place them in the array
- Use a ForNext loop to copy the variable values to your textboxes.
-
May 1st, 2007, 06:16 PM
#3
Thread Starter
Lively Member
Re: code question
Code:
Randomize
rand = (999 * Rnd + 1)
guess = InputBox("Please Enter Your Guess")
For x = 0 To 1
txtguess(x) = guess
Next x
this is my code so far but its wrong..
also if my guess is wrong how can i continue making inputboxes?
-
May 1st, 2007, 06:16 PM
#4
Re: code question
What constitutes a guess?
A button click?
-
May 1st, 2007, 06:19 PM
#5
Thread Starter
Lively Member
Re: code question
 Originally Posted by Hack
What constitutes a guess?
A button click?
yes..when i click start an inputbox pops up. then you enter your guess
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
|