Welcome to Dream.In.Code
Become a VB Expert!

Join 149,991 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,342 people online right now. Registration is fast and FREE... Join Now!




assigning a value to a randomized number

 
Reply to this topicStart new topic

assigning a value to a randomized number

Diehl75
13 Nov, 2006 - 10:22 PM
Post #1

New D.I.C Head
*

Joined: 12 Nov, 2006
Posts: 3


My Contributions
Hello,
I am writing a program in which the user get to pick three choices the are command buttons. The command buttons generate randomized numbers 1-20. I need help figuring out how to put a dollar value to each number 1-20, then add the three amount the user has accumulated.
the code so far is;
Dim intResult as integer
Dim amountEarned1 as single
Randomize
intResult = ((20 * rnd) + 1)
Case 1
amountEarned1 = .75
msgBox ( "you have earned .75")

I need twenty different values and need to add three values once the user selects three choices. Any help would be greatly appreciated.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:02PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month