how can i make it so you can type a paragram in one textbox then press a button and it codes all the letters to another thing that you preset so it shows in another textbox? also how can i make a list of names randomize and have a certain percent for each one? i am seriously trying to learn vb.net(someone said i wasnt) but i have looked at ebooks, you guys recomend i try my own programs so im trying a few, but i still cant find any good ebooks or online tutorials, right now the programs i am working on is (hopefully it will work) one of my classes i heard i have to write a paragraph in bianary code, so i tryed to make a program to get some experience, i think worst come to worst and i cant have it convert it over, i can always have it use buttons, and the random list one is a program i was doing to practice and it is a lottery type program for me to mess around, i have it set up to add ppl to the list view and the number of tickets they buy, and i can make it randomize a number ticket, i just cant tie that to a name, and i cant save the list. all things for me to work on and increase my knowledge of vb. i guess it also doesnt help that when i look at your guy's coding, i cant try and do them, its probably because ive got an older version. i have Microsoft Visual Studio .NET 2003. im open for any help. that includes help finding good tutorials and with my programs.

List of names issue:

Public Function Random_Name()

Dim i as integer
Dim name as string
Randomize

i = int(rnd * 100) + 1     '1 to 100
Select Case i
Case 1 to 10
     name = "Samuel"
Case 11 to 20
     name = "Jackson"
Case 21 to 99
     name = "Billy Bob"
Case 100
     name = "George"
Case Else
     msgbox ("Error in function Random_Name")
     Exit Sub
End Select

Return name

End Function

ok, thanks, that helps a lot, now how do i make the select case vary based on the number of total tickets sold and the certain names as the names that bought a certain number of tickets?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.