IndexNr = 0
Totaal = 0
Do Until IndexNr = lstBedrag2.ListCount
Totaal = Totaal + (Val(lstBedrag2.List(IndexNr)))
IndexNr = IndexNr + 1
Loop
btw = Label21.Caption / 100 'BTW declareren
bedrag = Totaal 'bedrag declareren
Label15.Caption = Format(bedrag, "0.00")
Label16.Caption = Format(btw * bedrag, "0.00")
Alles = btw * bedrag + bedrag 'het totaal is btw * het bedrag + het bedrag
Label17.Caption = Format(Alles, "0.00")
If Label15.Caption < 1000 Then
Label15.Caption = Format(bedrag, "0.00")
Else
Label15.Caption = Format(bedrag, "0,000.00")
End If
If Label16.Caption < 1000 Then
Label16.Caption = Format(btw * bedrag, "0.00")
Else
Label16.Caption = Format(btw * bedrag, "0,000.00")
End If
If Label17.Caption < 1000 Then
Label17.Caption = Format(Alles, "0.00")
Else
Label17.Caption = Format(Alles, "0,000.00")
End If