VERSION 5.00
Begin VB.Form frmTictactoe 
   BackColor       =   &H80000012&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Tic Tac Toe"
   ClientHeight    =   5880
   ClientLeft      =   120
   ClientTop       =   390
   ClientWidth     =   9930
   ForeColor       =   &H8000000E&
   Icon            =   "frmTictactoe.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   7167.753
   ScaleMode       =   0  'User
   ScaleWidth      =   10802.62
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtEndGame 
      Appearance      =   0  'Flat
      BackColor       =   &H80000008&
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   435
      Left            =   6360
      Locked          =   -1  'True
      TabIndex        =   25
      Top             =   4020
      Width           =   3495
   End
   Begin VB.CommandButton cmdCont 
      Caption         =   "Keep Playing"
      Height          =   735
      Left            =   7032
      TabIndex        =   24
      ToolTipText     =   "Play new game using current values"
      Top             =   120
      Width           =   735
   End
   Begin VB.TextBox txtDiff 
      Appearance      =   0  'Flat
      BackColor       =   &H80000008&
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   375
      Left            =   6360
      Locked          =   -1  'True
      TabIndex        =   23
      Text            =   " "
      Top             =   1805
      Width           =   3495
   End
   Begin VB.CommandButton cmdReset 
      Caption         =   "Restart"
      Height          =   735
      Left            =   6251
      TabIndex        =   22
      ToolTipText     =   "Start over with new values"
      Top             =   120
      Width           =   735
   End
   Begin VB.TextBox txtWho 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000006&
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000A&
      Height          =   390
      Left            =   480
      Locked          =   -1  'True
      TabIndex        =   21
      Text            =   " "
      Top             =   0
      Width           =   5699
   End
   Begin VB.TextBox txtHCTurn 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000012&
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   6360
      Locked          =   -1  'True
      TabIndex        =   14
      Text            =   " "
      Top             =   1080
      Width           =   3495
   End
   Begin VB.CommandButton cmdBegin 
      Caption         =   "Ready"
      Height          =   735
      Left            =   7813
      TabIndex        =   13
      ToolTipText     =   "Start the game"
      Top             =   120
      Width           =   735
   End
   Begin VB.CommandButton cmddoneturn 
      Caption         =   "Exit"
      Height          =   372
      Left            =   8880
      TabIndex        =   11
      Top             =   5400
      Width           =   972
   End
   Begin VB.OptionButton Opto 
      Caption         =   "O"
      Height          =   369
      Left            =   9376
      TabIndex        =   10
      Top             =   492
      Width           =   460
   End
   Begin VB.OptionButton Optx 
      Caption         =   "X"
      Height          =   369
      Left            =   9376
      TabIndex        =   9
      Top             =   123
      Width           =   460
   End
   Begin VB.Label lblTies 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "Ties"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   8365
      TabIndex        =   20
      Top             =   2625
      Width           =   915
   End
   Begin VB.Label lblTiesNum 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   8365
      TabIndex        =   19
      Top             =   3281
      Width           =   915
   End
   Begin VB.Label lblLossNum 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   7354
      TabIndex        =   18
      Top             =   3281
      Width           =   919
   End
   Begin VB.Label lblWinNum 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   6343
      TabIndex        =   17
      Top             =   3281
      Width           =   919
   End
   Begin VB.Label lblLosses 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "Losses"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   7354
      TabIndex        =   16
      Top             =   2625
      Width           =   919
   End
   Begin VB.Label lblWins 
      Alignment       =   2  'Center
      BackColor       =   &H80000007&
      Caption         =   "Wins"
      BeginProperty Font 
         Name            =   "Papyrus"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000B&
      Height          =   330
      Left            =   6360
      TabIndex        =   15
      Top             =   2625
      Width           =   915
   End
   Begin VB.Label lblHP 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Select X or O:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   750
      Left            =   8640
      TabIndex        =   12
      Top             =   120
      Width           =   750
   End
   Begin VB.Label lbl9 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1428
      Left            =   4596
      TabIndex        =   8
      Top             =   4080
      Width           =   1608
   End
   Begin VB.Label lbl8 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1433
      Left            =   2526
      TabIndex        =   7
      Top             =   4093
      Width           =   1608
   End
   Begin VB.Label lbl7 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1428
      Left            =   480
      TabIndex        =   6
      Top             =   4092
      Width           =   1608
   End
   Begin VB.Label lbl6 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1433
      Left            =   4593
      TabIndex        =   5
      Top             =   2251
      Width           =   1608
   End
   Begin VB.Label lbl5 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1428
      Left            =   2526
      TabIndex        =   4
      Top             =   2251
      Width           =   1608
   End
   Begin VB.Label lbl4 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1425
      Left            =   480
      TabIndex        =   3
      Top             =   2250
      Width           =   1605
   End
   Begin VB.Label lbl3 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1433
      Left            =   4593
      TabIndex        =   2
      Top             =   409
      Width           =   1608
   End
   Begin VB.Label lbl2 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1433
      Left            =   2526
      TabIndex        =   1
      Top             =   409
      Width           =   1608
   End
   Begin VB.Label lbl1 
      Alignment       =   2  'Center
      BackColor       =   &H80000009&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1440
      Left            =   480
      TabIndex        =   0
      Top             =   405
      Width           =   1605
   End
   Begin VB.Menu mnutttfile 
      Caption         =   "&File"
      Begin VB.Menu mnuFileChangename 
         Caption         =   "&Change Name"
      End
      Begin VB.Menu mnuFileSep1 
         Caption         =   "-"
      End
      Begin VB.Menu mnuTttfileexit 
         Caption         =   "E&xit"
      End
   End
   Begin VB.Menu mnuDiff 
      Caption         =   "Select &Difficulty"
      Begin VB.Menu mnuDiffEasy 
         Caption         =   "&Easy"
      End
      Begin VB.Menu mnuDiffMed 
         Caption         =   "&Medium"
      End
      Begin VB.Menu mnuDiffHard 
         Caption         =   "&Hard - DO NOT USE YET!!!"
      End
   End
End
Attribute VB_Name = "frmTictactoe"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Human As String
Dim Computer As String
Dim Wins As Integer
Dim Losses As Integer
Dim Ties As Integer
Dim Player As String
Dim Easy As Boolean
Dim Medium As Boolean
Dim Hard As Boolean
Dim Title As String



Option Explicit

Private Sub cmdBegin_Click()
    Optx.Enabled = True
    Opto.Enabled = True
    Optx.Visible = True
    Opto.Visible = True
    lblHP.Visible = True
End Sub

Private Sub cmdCont_Click()
    lbl1 = " "
    lbl2 = " "
    lbl3 = " "
    lbl4 = " "
    lbl5 = " "
    lbl6 = " "
    lbl7 = " "
    lbl8 = " "
    lbl9 = " "
    txtHCTurn.Text = Player & "'s Turn"
    txtWho.Text = Title & " " & Player & " is " & Human
    lblWinNum.Caption = Wins
    lblLossNum = Losses
    lblTiesNum = Ties
    If Wins = 0 And Losses = 0 And Ties = 0 Then
        Title = "Newbie"
    End If
    If Wins > 10 And Losses < 3 And Ties < 5 Then
        Title = "Student"
    End If
    If Wins > 20 And Losses < 5 And Ties < 10 Then
        Title = "Master"
    End If
    If Wins > 50 And Losses < 10 And Ties < 20 Then
        Title = "Lord"
    End If
    If Wins > 50 And Losses < 10 And Ties < 20 And Hard = True Then
        Title = "Tic Tac Toe God"
    End If
    If Wins = 0 And Losses > 10 And Ties > 10 Then
        Title = "Loser Supreme"
    End If
    If Player = "Bill" Then
        Title = "Big Boss"
    End If
    If Player = "Justin" Then
        Title = "The Great"
    End If
    If Player = "Jen" Then
        Title = "Sexy"
    End If
    If Player = "" Then
        Title = "That which cannot be named"
    End If
    If Player = " " Then
        Title = "That which cannot be named"
    End If
        
End Sub

Private Sub cmddoneturn_Click()
    frmMain.Show
    MsgBox "Thank you for playing Just I-Names.com Tic Tac Toe!"
    Unload Me
End Sub

Private Sub cmdReset_Click()
    Optx.Enabled = False
    Opto.Enabled = False
    Unload Me
    frmTictactoe.Show
    Optx.Visible = True
    Opto.Visible = True
    lblHP.Visible = True
    Player = ""
    Wins = 0
    Losses = 0
    Ties = 0
    
End Sub

Private Sub Form_Load()
   
    Player = InputBox("Please enter the name you wish to be known as", "Enter your name")
    MsgBox "OK, " & Player & ", if you are ready to start playing, select your desired difficulty level, press the Ready button and select your X or O."
    Beep
    Optx.Enabled = False
    Opto.Enabled = False
    If Optx.Enabled = False Then
        Human = " "
    End If
    If Opto.Enabled = False Then
        Human = " "
    End If
  
   
    lblWinNum.Caption = Wins
    lblLossNum = Losses
    lblTiesNum = Ties
        
End Sub



Private Sub lbl1_Click()

    If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl1.Caption = " " And Easy = True Then
        lbl1.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl1.Caption = " " And Medium = True Then
        lbl1.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl1.Caption = " " And Hard = True Then
        lbl1.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl1.Caption = Human Or lbl1.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If

CompTurn1:  'Basic moves (All levels)
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl2_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl2.Caption = " " And Easy = True Then
        lbl2.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl2.Caption = " " And Medium = True Then
        lbl2.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl2.Caption = " " And Hard = True Then
        lbl2.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl2.Caption = Human Or lbl2.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub


Private Sub lbl3_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl3.Caption = " " And Easy = True Then
        lbl3.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl3.Caption = " " And Medium = True Then
        lbl3.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl3.Caption = " " And Hard = True Then
        lbl3.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl3.Caption = Human Or lbl3.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub


Private Sub lbl4_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl4.Caption = " " And Easy = True Then
        lbl4.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl4.Caption = " " And Medium = True Then
        lbl4.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl4.Caption = " " And Hard = True Then
        lbl4.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl4.Caption = Human Or lbl4.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl5_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl5.Caption = " " And Easy = True Then
        lbl5.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl5.Caption = " " And Medium = True Then
        lbl5.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl5.Caption = " " And Hard = True Then
        lbl5.Caption = Human
'        GoTo CTK1
        MsgBox "THIS SHOULD BE DELETED"
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl5.Caption = Human Or lbl5.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl6_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl6.Caption = " " And Easy = True Then
        lbl6.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl6.Caption = " " And Medium = True Then
        lbl6.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl6.Caption = " " And Hard = True Then
        lbl6.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl6.Caption = Human Or lbl6.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl7_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl7.Caption = " " And Easy = True Then
        lbl7.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl7.Caption = " " And Medium = True Then
        lbl7.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl7.Caption = " " And Hard = True Then
        lbl7.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl7.Caption = Human Or lbl7.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl8_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl8.Caption = " " And Easy = True Then
        lbl8.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl8.Caption = " " And Medium = True Then
        lbl8.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl8.Caption = " " And Hard = True Then
        lbl8.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl8.Caption = Human Or lbl8.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub

Private Sub lbl9_Click()
   If Human = " " Then
        GoTo Nogood
    End If
        
    If lbl9.Caption = " " And Easy = True Then
        lbl9.Caption = Human
        GoTo CompTurn1
    Else: GoTo MedCheck
    End If

MedCheck:
    If lbl9.Caption = " " And Medium = True Then
        lbl9.Caption = Human
        GoTo CTB1
    Else: GoTo HardCheck
    End If
    
HardCheck:
    If lbl9.Caption = " " And Hard = True Then
        lbl9.Caption = Human
'        GoTo CTK1
    Else: GoTo DiffCheck
    End If
    
DiffCheck:
    If Easy = False And Medium = False And Hard = False Then
        MsgBox "Please select a difficulty level before playing!"
        frmTictactoe.Show
    Else: GoTo CapCheck
    End If
    
CapCheck:
    If lbl9.Caption = Human Or lbl9.Caption = Computer Then
        MsgBox "That square has already been used! Please choose another square!"
        GoTo HumanTurn
    Else: MsgBox "Something is horribly 'f'ed up!"
    End If
    
CTB1:  'Computer Turn - Block (Medium and Hard levels) Checks for all 24 possible eminent Human wins
    If lbl1.Caption = Human And lbl2.Caption = Human Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB2
    End If
    
CTB2:
    If lbl1.Caption = Human And lbl3.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB3
    End If

CTB3:
    If lbl2.Caption = Human And lbl3.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB4
    End If
    
CTB4:
    If lbl4.Caption = Human And lbl5.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB5
    End If
    
CTB5:
    If lbl4.Caption = Human And lbl6.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB6
    End If
    
CTB6:
    If lbl5.Caption = Human And lbl6.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB7
    End If
    
CTB7:
    If lbl7.Caption = Human And lbl8.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB8
    End If
            
CTB8:
    If lbl7.Caption = Human And lbl9.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB9
    End If

CTB9:
    If lbl8.Caption = Human And lbl9.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB10
    End If

CTB10:
    If lbl1.Caption = Human And lbl4.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB11
    End If
    
CTB11:
    If lbl1.Caption = Human And lbl7.Caption = Human And lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB12
    End If
    
CTB12:
    If lbl4.Caption = Human And lbl7.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB13
    End If
    
CTB13:
    If lbl2.Caption = Human And lbl5.Caption = Human And lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB14
    End If

CTB14:
    If lbl2.Caption = Human And lbl8.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB15
    End If
    
CTB15:
    If lbl5.Caption = Human And lbl8.Caption = Human And lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB16
    End If
    
CTB16:
    If lbl3.Caption = Human And lbl6.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB17
    End If
    
CTB17:
    If lbl3.Caption = Human And lbl9.Caption = Human And lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB18
    End If
    
CTB18:
    If lbl6.Caption = Human And lbl9.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB19
    End If
    
CTB19:
    If lbl1.Caption = Human And lbl5.Caption = Human And lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB20
    End If
    
CTB20:
    If lbl1.Caption = Human And lbl9.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB21
    End If
    
CTB21:
    If lbl5.Caption = Human And lbl9.Caption = Human And lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB22
    End If
    
CTB22:
    If lbl3.Caption = Human And lbl5.Caption = Human And lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB23
    End If
    
CTB23:
    If lbl3.Caption = Human And lbl7.Caption = Human And lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CTB24
    End If
    
CTB24:
    If lbl5.Caption = Human And lbl7.Caption = Human And lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn1
    End If
            
CompTurn1:
    txtHCTurn.Text = "Computer's Turn"
    If lbl5.Caption = " " Then
        lbl5.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn2
    End If
    
CompTurn2:
    If lbl1.Caption = " " Then
        lbl1.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn3
    End If
    
CompTurn3:
    If lbl3.Caption = " " Then
        lbl3.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn4
    End If

CompTurn4:
    If lbl7.Caption = " " Then
        lbl7.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn5
    End If

CompTurn5:
    If lbl9.Caption = " " Then
        lbl9.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn6
    End If
    
CompTurn6:
    If lbl2.Caption = " " Then
        lbl2.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn7
    End If

CompTurn7:
    If lbl4.Caption = " " Then
        lbl4.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn8
    End If

CompTurn8:
    If lbl6.Caption = " " Then
        lbl6.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: GoTo CompTurn9
    End If
    
CompTurn9:
    If lbl8.Caption = " " Then
        lbl8.Caption = Computer
        txtHCTurn.Text = Player & "'s Turn"
        GoTo HumanTurn
    Else: MsgBox "Who won?"
    End If

HumanTurn:
    If Human = " " Then
        GoTo Nogood
    End If
    
    
Nogood:
    If Human = " " Then
        MsgBox "Please select X or O first!!!"
        Unload Me
        frmTictactoe.Show
    End If
End Sub



Private Sub mnuDiffEasy_Click()
    mnuDiffEasy.Checked = True
    mnuDiffMed.Checked = False
    mnuDiffHard.Checked = False
    txtDiff.Text = Player & " at Easy Level"
    Easy = True
    Medium = False
    Hard = False
    MsgBox "Very Easy"
End Sub

Private Sub mnuDiffHard_Click()
    mnuDiffEasy.Checked = False
    mnuDiffMed.Checked = False
    mnuDiffHard.Checked = True
    txtDiff.Text = Player & " at Hard Level"
    Easy = False
    Medium = False
    Hard = True
    MsgBox "Impossible - NOT SET UP YET!!"
    frmTictactoe.Show
    
End Sub

Private Sub mnuDiffMed_Click()
    mnuDiffEasy.Checked = False
    mnuDiffMed.Checked = True
    mnuDiffHard.Checked = False
    txtDiff.Text = Player & " at Medium Level"
    Easy = False
    Medium = True
    Hard = False
    MsgBox "Somewhat hard."
End Sub

Private Sub mnuFileChangename_Click()
    Player = InputBox("Please enter the new name you wish to have", "Enter your new name")
    txtWho.Text = Title & " " & Player & " is " & Human
    If Easy = True Then
        txtDiff.Text = Player & " at Easy Level"
    End If
    If Medium = True Then
        txtDiff.Text = Player & " at Medium Level"
    End If
    If Hard = True Then
        txtDiff.Text = Player & " at Hard Level"
    End If
    
End Sub

Private Sub mnuTttfileexit_Click()
    frmMain.Show
    MsgBox "Thank you for playing Just I-Names.com Tic Tac Toe!"
    Unload Me
End Sub

Private Sub Opto_Click()
    If Human = " " Then
        MsgBox "You will be O, the computer will be X"
        Human = "O"
        Computer = "X"
        txtWho.Text = Title & Player & " is " & Human
    Else:
        MsgBox "You may not switch sides in the middle of the game," & Player & "!"
        Optx.Visible = False
        Opto.Visible = False
        lblHP.Visible = False
    End If
   
End Sub

Private Sub Optx_Click()
    If Human = " " Then
        MsgBox "You will be X, the computer will be O"
        Human = "X"
        Computer = "O"
        txtWho.Text = Title & Player & " is " & Human
    Else:
        MsgBox "You may not switch sides in the middle of the game," & Player & "!"
        Optx.Visible = False
        Opto.Visible = False
        lblHP.Visible = False
    End If

End Sub


