Generate Random Decimal Numbers and add them to a ListBox
Generate Random Decimal Numbers and add them to a ListBox
API Declarations
Controls :
Listbox Name ; List1
Commandbutton Name ; Command1 Caption ; Add to List
'Set List Property Sorted = True (if you want sorted values )
Rate Generate Random Decimal Numbers and add them to a ListBox
(1(1 Vote))
Private Sub Command1_Click()
Randomize
'In this example the highest value is 0.99 (Change the value of (Rnd * 1) in a higher value if you want random values above zero)
List1.AddItem Int(Rnd * 1) & "." & Int(Rnd * 10) & Int(Rnd * 10)
End Sub
Generate Random Decimal Numbers and add them to a ListBox Comments
No comments yet — be the first to post one!
Post a Comment