Private Sub cmb_nhap_Click()
'tim dong cuoi trong bang du lieu can luu
Dim dongcuoi As Long
dongcuoi = SheetDATA.Range("A" & Row.Count).End(xlUp).Row
' luu tung noi dung tuong ung theo cot
With SheetDATA
.Range("c" & dongcuoi + 1).Value = cb_cus.Value
.Range("b" & dongcuoi + 1).Value = tb_etd.Value
.Range("E" & dongcuoi + 1).Value = tb_booking.Value
.Range("I" & dongcuoi + 1).Value = tb_cut.Value
.Range("B" & dongcuoi + 1).Value = tb_etd.Value
.Range("J" & dongcuoi + 1).Value = tb_free.Value
.Range("F" & dongcuoi + 1).Value = Cb_line.Value
.Range("D" & dongcuoi + 1).Value = tb_pod.Value
.Range("O" & dongcuoi + 1).Value = tb_note.Value
.Range("G" & dongcuoi + 1).Value = cb_20.Value
.Range("G" & dongcuoi + 1).Value = cb_40.Value
.Range("H" & dongcuoi + 1).Value = ob_18.Value
.Range("H" & dongcuoi + 1).Value = ob_20.Value
.Range("H" & dongcuoi + 1).Value = ob_25.Value
End With
'lam moi noi dung cua userform
Unload Me 'dong lai
Me.Show ' mo len
MsgBox "Du_lieu Hoan Thanh", 0, " Message"
Unload Du_lieu
Sheets("DATA").Range("DATA_START").Offset(1, 1) = cb_cus
End Sub
Tim dòng cuối bạn bị sai cú pháp ui. Sheets("data").range(... Chứ k phải sheetdata bạn
Chào bạn bạn xem lại dòng cuối nhé.