Private Sub Command1_Click()
If txtPass.Text = "password" Then MsgBox "Password accepted!", 12, "Thank You!" frmMain.Visible = True frmPass.Visible = False Else MsgBox "Invalid Password, Try Again!", 8, "Oops!" End If End Sub Private Sub Command1_Click() Text1.Text = Int(Rnd * 10) Text2.Text = Int(Rnd * 10) Text3.Text = Int(Rnd * 10) Text4.Text = Int(Rnd * 10) Text5.Text = Int(Rnd * 10) Label7.Caption = Val(Text1.Text) Label8.Caption = Val(Text2.Text) Label9.Caption = Val(Text3.Text) Label10.Caption = Val(Text4.Text) Label11.Caption = Val(Text5.Text) End Sub Private Sub Form_Load() MsgBox "Welcome to Jeff's 5 Number Lotto!", 12, "Welcome!" End Sub Private Sub Form_Unload(Cancel As Integer) MsgBox "Goodbye Lotto", 12, "See ya later!" End Sub |