i have here a code for my enlistment module..this code is for the available slot. for example i have set 10 as available slot and when i enlist a student 10 will become 9 and so on..my problem is when it reach zero because i can still enlist but the available slot becomes -1...how do i solve this?
Public Sub auto()
Dim x As Integer
x = TextBox3.Text
TextBox3.Text = Format(x - 1)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
auto()
MessageBox.Show("Enlisted", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information)
If TextBox3.Text = "0" Then
MessageBox.Show("Slots are full", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
end sub