السلام عليكم
جرب هذا الكود
If not Me.ComboBox7.text ="" Then
ws.Cells(iRow + 1, 2).Value = Me.TextBox4.Value
ws.Cells(iRow + 1, 3).Value = DateSerial(Year(Me.TextBox1.Value), Month(Me.TextBox1.Value), Day(Me.TextBox1.Value))
ws.Cells(iRow + 1, 4).Value = Me.ComboBox4.Value
ws.Cells(iRow + 1, 8).Value = Me.ComboBox3.Value
ws.Cells(iRow + 1, 13).Value = Me.ComboBox5.Value
End If
If not Me.ComboBox8.text= "" Then
ws.Cells(iRow + 2, 2).Value = Me.TextBox4.Value
ws.Cells(iRow + 2, 3).Value = DateSerial(Year(Me.TextBox1.Value), Month(Me.TextBox1.Value), Day(Me.TextBox1.Value))
ws.Cells(iRow + 2, 4).Value = Me.ComboBox4.Value
ws.Cells(iRow + 2, 8).Value = Me.ComboBox3.Value
ws.Cells(iRow + 2, 13).Value = Me.ComboBox5.Value
End If
تحياتي