M
Mike Fellows
I have a windows form with a tabcontrol on it
within each tabpage there is a button that does basically the same thing
except with the difference of one variable
at the end of each of the button.click sub i run me.close()
me.close() works on 2 of the 3 buttons with no problems
on one of the forms it leaves the windows form open, even though when
debugging it is running the me.close command
here is my button click code (and me.close() is definatley executed)
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button12.Click
Dim telephone As Boolean
Dim repname As String = Me.ComboBox1.Text.ToString
Dim rating As String = Me.ComboBox6.Text.ToString
If rating = "6. No Telephone" Then
telephone = False
Else
telephone = True
End If
Dim telchk As String = ComboBox5.Text.ToString
Dim yesno As String = "NULL"
Dim try1 As String = Me.Label16.Text.ToString
Dim try2 As String = Me.Label26.Text.ToString
Dim try3 As String = Me.Label19.Text.ToString
Dim councilrtb As String = Me.DateTimePicker1.Text.ToString
Dim team As String = Me.ComboBox4.Text.ToString
If telephone = True Then
RaiseEvent MyEvent(repname, rating, telchk, yesno, try1, try2, try3,
councilrtb, team, "Live")
Else
RaiseEvent MyEvent(repname, rating, telchk, yesno, try1, try2, try3,
councilrtb, team, "Live (No Tel)")
End If
Me.Close()
within each tabpage there is a button that does basically the same thing
except with the difference of one variable
at the end of each of the button.click sub i run me.close()
me.close() works on 2 of the 3 buttons with no problems
on one of the forms it leaves the windows form open, even though when
debugging it is running the me.close command
here is my button click code (and me.close() is definatley executed)
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button12.Click
Dim telephone As Boolean
Dim repname As String = Me.ComboBox1.Text.ToString
Dim rating As String = Me.ComboBox6.Text.ToString
If rating = "6. No Telephone" Then
telephone = False
Else
telephone = True
End If
Dim telchk As String = ComboBox5.Text.ToString
Dim yesno As String = "NULL"
Dim try1 As String = Me.Label16.Text.ToString
Dim try2 As String = Me.Label26.Text.ToString
Dim try3 As String = Me.Label19.Text.ToString
Dim councilrtb As String = Me.DateTimePicker1.Text.ToString
Dim team As String = Me.ComboBox4.Text.ToString
If telephone = True Then
RaiseEvent MyEvent(repname, rating, telchk, yesno, try1, try2, try3,
councilrtb, team, "Live")
Else
RaiseEvent MyEvent(repname, rating, telchk, yesno, try1, try2, try3,
councilrtb, team, "Live (No Tel)")
End If
Me.Close()