#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default random


yes Iwill like it to be interactive with input and msgbox, th
questions I can put in the code itself they are basic its fo
memorization puposes, I will like it to be random so it does not as
the questions in the same order everytime, so memorization is mor
effective.

???

--
nyn0
-----------------------------------------------------------------------
nyn04's Profile: http://www.excelforum.com/member.php...fo&userid=1265
View this thread: http://www.excelforum.com/showthread.php?threadid=26199

  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default random

hi
It would be nice if you keep your replys to the original
post.
-----Original Message-----

yes Iwill like it to be interactive with input and

msgbox, the
questions I can put in the code itself they are basic its

for
memorization puposes, I will like it to be random so it

does not ask
the questions in the same order everytime, so

memorization is more
effective.

????


--
nyn04
----------------------------------------------------------

--------------
nyn04's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=12658
View this thread:

http://www.excelforum.com/showthread...hreadid=261991

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default random

SOmething along these lines would work

Simpe but effective


A B C
1 What is the Capital of France paris
2 What is Two and Two 4
3 What is the square root of 9 3
4 What is PI to 6 decimal places 3.14287
5 Do Fish swim yes
6 Do Birds fly no
7 Who is the PrimeMinister of England n10
8 Who wrote Shakespears Sonnets shakespear
9 Who composed Faures requime Mass faure
10 Are you always right no




Sub Questions()

' HIDEs Q/A

Rows("1:10").Select
Selection.EntireRow.Hidden = True


MsgBox ("Enter stop in the input box to end the test") & vbCr & (" You may
have 50 attempts * USE LOWER CASE ONLY * or numbers where appropriate ")


Dim x, y, attempts, ca As Integer
Dim question As String
Dim reply As String
Dim answer As String

For x = 1 To 50
Range("a1").Select

q = Int(Rnd() * 10)

Range("A1").Select
Do Until ActiveCell.Value = q
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 1).Select
question = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
reply = ActiveCell.Value

answer = InputBox(question)
If answer = "stop" Then Rows("1:10").Select
If answer = "stop" Then Selection.EntireRow.Hidden = False

If answer = "stop" Then Exit For
If answer = reply Then ca = ca + 1
attempts = attempts + 1
If answer = reply Then MsgBox ("ROCKING YOU GOT IT RIGHT")
If answer < reply Then MsgBox ("The response was incorrect ")
MsgBox ("YOU HAVE ANSWERED ") & attempts & (" QUESTIONS WITH ") & ca & ("
CORRECT ANSWERS SO FAR ") & vbCr & " " & vbCr & (" THE CORRECT ANSWER WAS
") & reply

Next


Rows("1:10").Select
Selection.EntireRow.Hidden = False


MsgBox (" YOU HAVE HAD ") & attempts & (" QUESTIONS WITH ") & ca & ("
CORRECT ANSWERS SO FAR")


End Sub



wrote in message
...
hi
It would be nice if you keep your replys to the original
post.
-----Original Message-----

yes Iwill like it to be interactive with input and

msgbox, the
questions I can put in the code itself they are basic its

for
memorization puposes, I will like it to be random so it

does not ask
the questions in the same order everytime, so

memorization is more
effective.

????


--
nyn04
----------------------------------------------------------

--------------
nyn04's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=12658
View this thread:

http://www.excelforum.com/showthread...hreadid=261991

.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting random Data created from a random formula Six Sigma Blackbelt Excel Discussion (Misc queries) 1 September 11th 08 11:03 PM
random 3 out of many Jack Sons Excel Discussion (Misc queries) 2 June 12th 08 10:19 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"