Private Sub cmb_data_ok_Click()
Dim NLig As Long 'numéro de la ligne d'écriture
'Déterminer la ligne d'écriture
If Cells(6, 1) = "" Then
Cells(6, 1).Select 'Si c'est le 1er enregistrement
Else 'on doit distinguer les deux cas à cause de la fusion des cellules A3,A4,A5
Cells(Rows.Count, 1).End(xlUp)(2).Select 'Si ce n'est pas le premier on ajoute à la suite
End If
NLig = ActiveCell.Row
'order
Cells(NLig, 1) = "REC" & Val(txt_data_order_1) & "-" & Val(txt_data_order_2)
'Size of the heat exchanger
Cells(NLig, 2) = txt_data_size_l.Value & " x " & txt_data_size_l2.Value & " x " & txt_data_size_h.Value
'Number of shift
Cells(NLig, 3) = cb_data_shift.Value
'Number of hours working per person a day
Cells(NLig, 4) = (txt_data_hours_h.Value * 60) + txt_data_hours_m.Value
'Quantity of bars to prepare
Cells(NLig, 5) = txt_data_qtbars.Value
'Quantity of sheets to saw
Cells(NLig, 6) = txt_data_sheets.Value
'Number of layers
Cells(NLig, 7) = txt_data_layers.Value
'Bars time
Cells(NLig, 8) = (Val(txt_data_qtbars) * 150) / 60
'Sheets time
Cells(NLig, 9) = txt_data_sheets.Value
'Degreasing time
Cells(NLig, 12) = txt_data_degreasing1.Value
Cells(NLig, 13) = txt_data_degreasing2.Value
Cells(NLig, 14) = txt_data_degreasing3.Value
'Number of layers
Cells(NLig, 15) = (Val(txt_data_layers) * 2) + 360
'Brazing time
Cells(NLig, 16) = (txt_data_brazing_h.Value * 60) + txt_data_brazing_m.Value
Unload Frm_Data
End Sub
Private Sub cmb_data_cancel_Click()
Unload Frm_Data
End Sub