Q1:
Have a listbox hidden.
Code:Function randomnumber(finished) Randomize randomnumber = Int((Val(finished) * Rnd) + 1) End Function Private Sub Form_Load() For i = 0 To Screen.FontCount - 1 List1.AddItem (Screen.Fonts(i)) Next i End Sub Private Sub Command1_Click() List1.ListIndex = randomnumber(List1.ListCount) End Sub Private Sub List1_Click() Text1.Font.Name = List1.Text End Sub




Reply With Quote