VERSION 5.00 Begin VB.Form frmGuessNumber Caption = "Guess Number" ClientHeight = 2112 ClientLeft = 48 ClientTop = 336 ClientWidth = 3864 LinkTopic = "Form1" ScaleHeight = 2112 ScaleWidth = 3864 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdDone Caption = "Done" Height = 372 Left = 2160 TabIndex = 4 Top = 1560 Width = 1452 End Begin VB.CommandButton cmdCheckGuess Caption = "Check Guess" Height = 372 Left = 240 TabIndex = 3 Top = 1560 Width = 1452 End Begin VB.TextBox txtGuess Height = 288 Left = 3120 TabIndex = 1 Top = 240 Width = 492 End Begin VB.Label lblNumbersGuessed Height = 372 Left = 120 TabIndex = 2 Top = 840 Width = 3492 End Begin VB.Label lblDirections Caption = "Guess a number between 0 and 100:" Height = 252 Left = 120 TabIndex = 0 Top = 240 Width = 2892 End End Attribute VB_Name = "frmGuessNumber" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private intSecretNumber As Integer Private Sub Form_Load() Randomize intSecretNumber = 100 * Rnd + 1 End Sub Private Sub cmdCheckGuess_Click() Dim intUserGuess As Integer intUserGuess = txtGuess.Text 'Add guess to label lblNumbersGuessed.Caption = lblNumbersGuessed.Caption & _ intUserGuess & " " If intUserGuess <> intSecretNumber Then MsgBox "Wrong number. Guess again." End If End Sub Private Sub cmdDone_Click() Unload Me End Sub