'Multipage 3 [1-9] Stucadoren BLK
If chkStucBLK.Value = True Then
Bool = False
DoelSheet = "StucBLk"
'Voor invoer van de data de sheet van beveiliging afhalen
Worksheets(DoelSheet).Unprotect
'Eerste reeks
'De BesturingselementNamen toekennen aan de publieke variabelen
cboStelVHPnr = "cboStucBLK1"
tbxAantVHPnr = "tbxStucBLK1"
tbxStelVHPPrijsnr = "tbxStucBLKPrijs1"
cboStelVHPMMnr = "cboStucBLKMM1"
tbxAantVHPMMnr = "tbxStucBLKMM1"
tbxStelVHPMMPrijsnr = "tbxStucBLKMMPrijs1"
FoutRij = 1
Verwerken
If Bool = True Then
GoTo Beeindigen
End If
'Tweede reeks
'De BesturingselementNamen toekennen aan de publieke variabelen
cboStelVHPnr = "cboStucBLK2"
tbxAantVHPnr = "tbxStucBLK2"
tbxStelVHPPrijsnr = "tbxStucBLKPrijs2"
cboStelVHPMMnr = "cboStucBLKMM2"
tbxAantVHPMMnr = "tbxStucBLKMM2"
tbxStelVHPMMPrijsnr = "tbxStucBLKMMPrijs2"
FoutRij = 2
Verwerken
If Bool = True Then
GoTo Beeindigen
End If
End sub
'-----------------------------------------------------------------------------
'Daadwerkelijk plaatsen
'-----------------------------------------------------------------------------
'SHEETS INVOEREN ipv "Productie invoer"
Private Sub Verwerken()
'Invoer van de types controleren
If (Controls(cboStelVHPnr).Value = "" And Controls(tbxAantVHPnr).Value = "" And Controls(tbxStelVHPPrijsnr).Value = "") And (Controls(cboStelVHPMMnr).Value = "" And Controls(tbxAantVHPMMnr).Value = "" And Controls(tbxStelVHPMMPrijsnr).Value = "") Then
Exit Sub
'Indien een van de velden uit de eerste reeks wel een waarde bevat, dan
ElseIf (Controls(cboStelVHPnr).Value <> "" Or Controls(tbxAantVHPnr).Value <> "") Then
'waarden controleren
If Controls(cboStelVHPnr).Value = "" Then
msgGeenType
Controls(cboStelVHPnr).SetFocus
Bool = True
Exit Sub
ElseIf IsNumeric(Controls(tbxAantVHPnr).Value) = False Then
msgGeenAantalType
Controls(tbxAantVHPnr).SetFocus
Bool = True
Exit Sub
End If
'Waarden aan publieke variabelen toekennen
TypeOnthouden = Controls(cboStelVHPnr).Value
TypeAantalOnthouden = Controls(tbxAantVHPnr).Value
TypePrijsOnthouden = Controls(tbxStelVHPPrijsnr).Value
End If
'Invoer van de EWZH controleren
'Indien een van de velden uit de tweede reeks wel een waarde bevat, dan
If (Controls(cboStelVHPMMnr).Value <> "" Or Controls(tbxAantVHPMMnr).Value <> "" Or Controls(tbxStelVHPMMPrijsnr).Value <> "") Then
'waarden controleren
If Controls(cboStelVHPMMnr).Value = "" Then
msgGeenEWZH
Controls(cboStelVHPMMnr).SetFocus
Bool = True
Exit Sub
ElseIf IsNumeric(Controls(tbxAantVHPMMnr).Value) = False Then
msgGeenAantalEWZH
Controls(tbxAantVHPMMnr).SetFocus
Bool = True
Exit Sub
End If
'Waarden aan publieke variabelen toekennen
EWZHOnthouden = Controls(cboStelVHPMMnr).Value
EWZHAantalOnthouden = Controls(tbxAantVHPMMnr).Value
EWZHPrijsOnthouden = Controls(tbxStelVHPMMPrijsnr).Value
End If
'SUB Productie optellen
ProductieTotalen
'Naar sub gaan om de velden in te voeren
DataToevoegen
'Alle velden weer leeg maken zodat na een foutmelding niet alles weer opnieuw wordt uitgevoerd.
Controls(cboStelVHPnr).Value = ""
Controls(tbxAantVHPnr).Value = ""
Controls(tbxStelVHPPrijsnr).Value = ""
Controls(cboStelVHPMMnr).Value = ""
Controls(tbxAantVHPMMnr).Value = ""
Controls(tbxStelVHPMMPrijsnr).Value = ""
End Sub