mcorn
10-04-2004, 03:21 PM
Hi,
I would like to try to code a program that contains a command button, label, and an image area. I would like to make the program draw a random text string from a text file or access database, display the string in the label area, and then display some kind of message in the image area.
I am trying to come up with a program that will pick a name for a drawing.
I found some code for random numbers as follows:
Private Sub Command1_Click()
Image1.Visible = false
Label1.Caption = Int(Rnd * 10)
If (Label1.Caption = "7") Then
Image1.Visible = True
End If
End Sub
Is there a way to make this scenario work with strings of text from a text file or an access database?
Thanks for any help!
MCorn
I would like to try to code a program that contains a command button, label, and an image area. I would like to make the program draw a random text string from a text file or access database, display the string in the label area, and then display some kind of message in the image area.
I am trying to come up with a program that will pick a name for a drawing.
I found some code for random numbers as follows:
Private Sub Command1_Click()
Image1.Visible = false
Label1.Caption = Int(Rnd * 10)
If (Label1.Caption = "7") Then
Image1.Visible = True
End If
End Sub
Is there a way to make this scenario work with strings of text from a text file or an access database?
Thanks for any help!
MCorn