Private Sub Suadulieu_Click()
'On Error Resume Next
Dim i As Long, Sua(1 To 11), a As String, b As String, c As String, d As String, e As String, f As String
Dim a1 As String, a2 As String, b1 As String, g As String
[COLOR=#0000cd]Dim AA As Date, AB As Date[/COLOR]
[COLOR=#ff0000]Dim EditRow As Long[/COLOR]
[COLOR=#0000cd] AA = DATE_RELEASE.Text[/COLOR]
[COLOR=#0000cd] AB = COMBOBOXNGAY.Text[/COLOR]
[COLOR=#ff0000] EditRow = listbox_nhaplieu.ListIndex + 2[/COLOR]
a = Trim(SHIFT.Text)
a1 = Trim(TIME_RELEASE.Text)
a2 = Trim(ID.Text)
b = Trim(FGGCAS.Text)
c = Trim(LOT.Text)
b1 = Trim(NAMEFG.Text)
d = Trim(PKTIME.Text)
e = Trim(TIMESTAR.Text)
f = Trim(TIMEEND.Text)
g = Trim(REMARK.Text)
If a = "" Or a1 = "" Or a2 = "" Or b = "" Or b1 = "" Or c = "" Or d = "" Or e = "" Or f = "" Then
MsgBox "Hay nhap day du du lieu", vbExclamation + vbOKOnly, "ERROR nhap lieu"
Else
With EditSheet
.Cells(EditRow, 1).Value = AA
.Cells(EditRow, 2).Value = AB
.Cells(EditRow + 1, 3).Value = a1
.Cells(EditRow + 1, 4).Value = a
.Cells(EditRow, 5).Value = a2
.Cells(EditRow, 6).Value = b
.Cells(EditRow, 7).Value = c
.Cells(EditRow, 8).Value = b1
.Cells(EditRow, 9).Value = d
.Cells(EditRow, 10).Value = e
.Cells(EditRow, 11).Value = f
.Cells(EditRow, 18).Value = g
listbox_nhaplieu.List(EditRow - 2, 0) = AA
listbox_nhaplieu.List(EditRow - 2, 1) = AB
listbox_nhaplieu.List(EditRow - 2, 2) = a1
listbox_nhaplieu.List(EditRow - 2, 3) = a
listbox_nhaplieu.List(EditRow - 2, 4) = a2
listbox_nhaplieu.List(EditRow - 2, 5) = b
listbox_nhaplieu.List(EditRow - 2, 6) = c
listbox_nhaplieu.List(EditRow - 2, 7) = b1
listbox_nhaplieu.List(EditRow - 2, 8) = d
listbox_nhaplieu.List(EditRow - 2, 9) = e
listbox_nhaplieu.List(EditRow - 2, 10) = f
End With
COMBOBOXNGAY = ""
DATE_RELEASE = ""
SHIFT = ""
ID = ""
TIME_RELEASE = ""
FGGCAS = ""
LOT = ""
NAMEFG = ""
PKTIME = ""
TIMESTAR = ""
TIMEEND = ""
REMARK = ""
ComboBox1.Text = ""
CheckBox15.Value = True
MsgBox "SUA DU LIEU XONG", vbInformation + vbOKOnly, "Thanh cong"
End If
Suadulieu.Enabled = False
End Sub