Private Sub CommandButton1_Click()
If TextBox1.Value = "" Then
msgbox "geef Artikelnummer in"
TextBox1.SetFocus
Exit Sub
End If
If ComboBox1.Value = "" Then
msgbox "geef naam in"
ComboBox1.SetFocus
Exit Sub
End If
If ComboBox2.Value = "" Then
msgbox "geef magazijn in"
ComboBox2.SetFocus
Exit Sub
End If
If TextBox2.Value = "" Then
msgbox "geef Leverancier in"
TextBox2.SetFocus
Exit Sub
End If
If ComboBox3.Value = "" Then
msgbox "geef startijd in"
TextBox3.SetFocus
Exit Sub
End If
If ComboBox4.Value = "" Then
msgbox "geef eindtijd in"
TextBox4.SetFocus
Exit Sub
End If
If ComboBox5.Value = "" Then
msgbox "geef pauze in"
TextBox5.SetFocus
Exit Sub
End If
If ComboBox6.Value = "" Then
msgbox "geef datum in"
ComboBox6.SetFocus
Exit Sub
End If
With Sheets("print").RANGE("A" & Rows.Count).End(xlUp)
.Offset(1) = ComboBox1.Value
.Offset(1, 1) = ComboBox2.Value
.Offset(1, 4) = ComboBox3.Value
.Offset(1, 5) = ComboBox4.Value
.Offset(1, 6) = ComboBox5.Value
.Offset(1, 2).Value = TextBox1.Value
.Offset(1, 3).Value = TextBox2.Value
.Offset(1, 7).Value = ComboBox6.Value
End With
Unload Me
End Sub