Code:
'Controle invoer
For Each cell In Range("C4")
If IsEmpty(cell) Then
MsgBox "Oeps, niet alle velden zijn ingevoerd": Exit Sub
Exit For
End If
For Each cell In Range("C11:C14")
If IsEmpty(cell) Then
MsgBox "Oeps, niet alle velden zijn ingevoerd": Exit Sub
Exit For
End If
For Each cell In Range("C19:C21")
If IsEmpty(cell) Then
MsgBox "Oeps, niet alle velden zijn ingevoerd": Exit Sub
Exit For
End If
For Each cell In Range("C25:C38")
If IsEmpty(cell) Then
MsgBox "Oeps, niet alle velden zijn ingevoerd": Exit Sub
Exit For
End If
For Each cell In Range("F11:F21")
If IsEmpty(cell) Then
MsgBox "Oeps, niet alle velden zijn ingevoerd": Exit Sub
Exit For
End If
Ik wil dat deze velden gecontroleerd worden of ze niet leeg zijn.
Alleen krijg ik nu een foutmelding dat "For" al in gebruik is.
Hoe kan ik dit anders schrijven?