Link to home
Start Free TrialLog in
Avatar of XK8ER
XK8ERFlag for United States of America

asked on

vb6 - random name function

Hello there,
I would like to create a function where I can write a list of over 100 names
and when I click a button it will show me a random name from the list in a msgbox
can someone point me in the right direction!!
Private Sub Command1_Click()
End Sub
Function showRandomName() As String
    showRandomName = list
End Function

Open in new window

Avatar of ee_rlee
Flag of Philippines image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Tomlinson
Don't forget to call "Randomize Timer" in the Form_Load() event...
Private Sub Form_Load()
    Randomize Timer
End Sub

Open in new window