Aufruf einer Userform führt zum Absturz von Excel

Informationen und Beispiele zu den hier genannten Dialog-Elementen:
UserForm ListBox TextBox MsgBox
Bild

Betrifft: Aufruf einer Userform führt zum Absturz von Excel
von: Robin Lange
Geschrieben am: 06.10.2015 15:10:02

Hallo ich habe ein Problem beim Aufrufen meiner Userform.
Das mysteriöse dabei ist das der VBA - Code einwandfrei funktioniert und ich nicht glaube dass der Code den Absturz von Excel verursacht.
Auf jedenfall wenn ich die Datei öffne und auf meinen Button klicke um die Userform aufzurufen führt es zum Absturz von Excel, dies passiert jedoch nicht wenn ich zuvor alt + F11 drücke um das Codefenster zu öffnen, dieses schließe und dann erst die Userform aufrufe, dann klappt es.

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: ransi
Geschrieben am: 06.10.2015 15:24:32
HAllo,
Zeigst du uns mal die Datei ?
ransi

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Firmus
Geschrieben am: 06.10.2015 15:24:47
Hallo ???,
ich habe ähnliches gehabt als ich von Excel 2003 auf 2010 migrierte, plötzlich stürzte Excel
bei Ausführung eines bestimmten Macros ab.
Ursache:
Ich hatte während der Macro-Ausführung aus einer XLSM-File genau diese XLSM-file per macro geschlossen, mit "ON Error Resume Next".
Nachdem ich mein Spaghetti entzerrt hatte, den logischen Fehler entdeckt und bereinigt hatte, lief das Macro problemlos auch unter 2010, und auch unter 2013 mittlerweile.
Vielleicht ......
Gruß
Firmus

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Robin Lange
Geschrieben am: 06.10.2015 15:50:07
Es handelt sich dabei um ein innerbetriebliches Projekt die Datei hier im File - Upload hochzustellen wäre mir nicht so lieb, ich hoffe Ihr nehmt mir das nicht übel. Aber ich könnte Code - Ausschnitte zur verfügung stellen. Und ich erkläre es gerne mal grob: Also die Userform besteht aus 221 Textboxen einem Listenfeld und 13 Buttons, sie ist an eine Tabelle1 angebunden, diese enthält 221 Spalten in Spalte A steht der Nachname von den Kunden Spalte A ist der Index für das Listenfeld in der Userform, bei auswahl des Nachnamens im Listenfeld schreibt er alle 221 Einträge für den Kunden aus der entsprechenden Zeile in die jeweils zugeordneten 221 Textboxen. Buttons Löschen, Speichern, Neuer Eintrag,Beenden, Such-Textbox, dann noch ein paar weitere für Berechnungen. Ich hoffe damit kann man was anfangen.
Ich danke euch jetzt schon für die schnellen Antworten. Ich hatte diesen Fehler mal gegoogelt und dabei etwas über das auslagern des Codes in Form von einer .xlam Datei als Add - In für Excel gelesen, könnte es vieleicht damit zusammenhängen? Gruß Robin

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Robin Lange
Geschrieben am: 06.10.2015 16:18:56
Ich muss aber auch gestehen den Code komplett auf die Userform geklatscht zu haben,also von modularer Programmierung keine Spur, vielleicht fängt damit auch schon das Problem an?

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: ransi
Geschrieben am: 06.10.2015 16:21:05
HAllo Robin,
dann zeig uns doch wenigstens den Code...
ransi

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Mullit
Geschrieben am: 06.10.2015 16:25:45
Hallo,

Aber ich könnte Code - Ausschnitte zur verfügung stellen.

und machst Du das auch...?
Bedenke, Du kriegst schon das Problem nicht mit der Datei vor der Nase geregelt, wir sollen es ohne schaffen, das wird nix...
Gruß, Mullit

Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Robin Lange
Geschrieben am: 06.10.2015 16:35:48
Option Explicit
Option Compare Text

Private Sub btn_aufteilenrez2_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt72.Value And Me.txt12.Value = 3 And Me.txt14.Value = 30 Then
         Me.txt73.Value = 10
         Me.txt77.Value = DateAdd("d", 28, Me.txt72.Value)
         Me.txt78.Value = 10
         Me.txt82.Value = DateAdd("d", 56, Me.txt72.Value)
         Me.txt83.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt72.Value And Me.txt12.Value = 3 And Me.txt14.Value = 3 Then
         Me.txt73.Value = 1
         Me.txt77.Value = DateAdd("d", 28, Me.txt72.Value)
         Me.txt78.Value = 1
         Me.txt82.Value = DateAdd("d", 56, Me.txt72.Value)
         Me.txt83.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt72.Value And Me.txt12.Value = 6 And Me.txt14.Value = 60 Then
         Me.txt73.Value = 10
         Me.txt77.Value = DateAdd("d", 28, Me.txt72.Value)
         Me.txt78.Value = 10
         Me.txt82.Value = DateAdd("d", 56, Me.txt72.Value)
         Me.txt83.Value = 10
         Me.txt87.Value = DateAdd("d", 84, Me.txt72.Value)
         Me.txt88.Value = 10
         Me.txt92.Value = DateAdd("d", 112, Me.txt72.Value)
         Me.txt93.Value = 10
         Me.txt97.Value = DateAdd("d", 140, Me.txt42.Value)
         Me.txt98.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt72.Value And Me.txt12.Value = 6 And Me.txt14.Value = 6 Then
         Me.txt73.Value = 1
         Me.txt77.Value = DateAdd("d", 28, Me.txt72.Value)
         Me.txt78.Value = 1
         Me.txt82.Value = DateAdd("d", 56, Me.txt72.Value)
         Me.txt83.Value = 1
         Me.txt87.Value = DateAdd("d", 84, Me.txt72.Value)
         Me.txt88.Value = 1
         Me.txt92.Value = DateAdd("d", 112, Me.txt72.Value)
         Me.txt93.Value = 1
         Me.txt97.Value = DateAdd("d", 140, Me.txt72.Value)
         Me.txt98.Value = 1
         Else
         End If
         If Me.txt72.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt12.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept 2,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt72.Text = "" And Me.txt12.Text = "" Then
         MsgBox "Bitte die DV bei Rezept 2 eintragen und bei DV1 ein Datum angeben!"
         Else
         End If
         If Me.txt14.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept2 ein!"
         Else
         Exit Sub
         End If
End Sub

Private Sub btn_aufteilenrez3_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt102.Value And Me.txt17.Value = 3 And Me.txt19.Value = 30 Then
         Me.txt103.Value = 10
         Me.txt107.Value = DateAdd("d", 28, Me.txt102.Value)
         Me.txt108.Value = 10
         Me.txt112.Value = DateAdd("d", 56, Me.txt102.Value)
         Me.txt113.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt102.Value And Me.txt17.Value = 3 And Me.txt19.Value = 3 Then
         Me.txt103.Value = 1
         Me.txt107.Value = DateAdd("d", 28, Me.txt102.Value)
         Me.txt108.Value = 1
         Me.txt112.Value = DateAdd("d", 56, Me.txt102.Value)
         Me.txt113.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt102.Value And Me.txt17.Value = 6 And Me.txt19.Value = 60 Then
         Me.txt103.Value = 10
         Me.txt107.Value = DateAdd("d", 28, Me.txt102.Value)
         Me.txt108.Value = 10
         Me.txt112.Value = DateAdd("d", 56, Me.txt102.Value)
         Me.txt113.Value = 10
         Me.txt117.Value = DateAdd("d", 84, Me.txt102.Value)
         Me.txt118.Value = 10
         Me.txt122.Value = DateAdd("d", 112, Me.txt102.Value)
         Me.txt123.Value = 10
         Me.txt127.Value = DateAdd("d", 140, Me.txt102.Value)
         Me.txt128.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt102.Value And Me.txt17.Value = 6 And Me.txt19.Value = 6 Then
         Me.txt103.Value = 1
         Me.txt107.Value = DateAdd("d", 28, Me.txt102.Value)
         Me.txt108.Value = 1
         Me.txt112.Value = DateAdd("d", 56, Me.txt102.Value)
         Me.txt113.Value = 1
         Me.txt117.Value = DateAdd("d", 84, Me.txt102.Value)
         Me.txt118.Value = 1
         Me.txt122.Value = DateAdd("d", 112, Me.txt102.Value)
         Me.txt123.Value = 1
         Me.txt127.Value = DateAdd("d", 140, Me.txt102.Value)
         Me.txt128.Value = 1
         Else
         End If
         If Me.txt102.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt17.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept 3,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt102.Text = "" And Me.txt17.Text = "" Then
         MsgBox "Bitte die DV bei Rezept 3 eintragen und bei DV1 ein Datum angeben!"
         Else
         End If
         If Me.txt19.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept3 ein!"
         Else
         Exit Sub
         End If
End Sub

Private Sub btn_aufteilenrez6_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt192.Value And Me.txt32.Value = 3 And Me.txt34.Value = 30 Then
         Me.txt193.Value = 10
         Me.txt197.Value = DateAdd("d", 28, Me.txt192.Value)
         Me.txt198.Value = 10
         Me.txt202.Value = DateAdd("d", 56, Me.txt192.Value)
         Me.txt203.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt192.Value And Me.txt32.Value = 3 And Me.txt34.Value = 3 Then
         Me.txt193.Value = 1
         Me.txt197.Value = DateAdd("d", 28, Me.txt192.Value)
         Me.txt198.Value = 1
         Me.txt202.Value = DateAdd("d", 56, Me.txt192.Value)
         Me.txt203.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt192.Value And Me.txt32.Value = 6 And Me.txt34.Value = 60 Then
         Me.txt193.Value = 10
         Me.txt197.Value = DateAdd("d", 28, Me.txt192.Value)
         Me.txt198.Value = 10
         Me.txt202.Value = DateAdd("d", 56, Me.txt192.Value)
         Me.txt203.Value = 10
         Me.txt207.Value = DateAdd("d", 84, Me.txt192.Value)
         Me.txt208.Value = 10
         Me.txt212.Value = DateAdd("d", 112, Me.txt192.Value)
         Me.txt213.Value = 10
         Me.txt217.Value = DateAdd("d", 140, Me.txt192.Value)
         Me.txt218.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt192.Value And Me.txt32.Value = 6 And Me.txt34.Value = 6 Then
         Me.txt193.Value = 1
         Me.txt197.Value = DateAdd("d", 28, Me.txt192.Value)
         Me.txt198.Value = 1
         Me.txt202.Value = DateAdd("d", 56, Me.txt192.Value)
         Me.txt203.Value = 1
         Me.txt207.Value = DateAdd("d", 84, Me.txt192.Value)
         Me.txt208.Value = 1
         Me.txt212.Value = DateAdd("d", 112, Me.txt192.Value)
         Me.txt213.Value = 1
         Me.txt217.Value = DateAdd("d", 140, Me.txt192.Value)
         Me.txt218.Value = 1
         Else
         End If
         If Me.txt192.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt32.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept6,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt192.Text = "" And Me.txt32.Text = "" Then
         MsgBox "Bitte die DV bei Rezept6 eintragen und bei DV1 ein Datum angeben!"
         Else
         End If
         If Me.txt34.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept6 ein!"
         Else
         Exit Sub
         End If
End Sub

Private Sub btn_drucken_Click()
Me.PrintForm
End Sub

Private Sub btn_entfernenrez5_Click()
Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept5 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt163.Value = ""
        Me.txt164.Value = ""
        Me.txt165.Value = ""
        Me.txt166.Value = ""
        Me.txt167.Value = ""
        Me.txt168.Value = ""
        Me.txt169.Value = ""
        Me.txt170.Value = ""
        Me.txt171.Value = ""
        Me.txt172.Value = ""
        Me.txt173.Value = ""
        Me.txt174.Value = ""
        Me.txt175.Value = ""
        Me.txt176.Value = ""
        Me.txt177.Value = ""
        Me.txt178.Value = ""
        Me.txt179.Value = ""
        Me.txt180.Value = ""
        Me.txt181.Value = ""
        Me.txt182.Value = ""
        Me.txt183.Value = ""
        Me.txt184.Value = ""
        Me.txt185.Value = ""
        Me.txt186.Value = ""
        Me.txt187.Value = ""
        Me.txt188.Value = ""
        Me.txt189.Value = ""
        Me.txt190.Value = ""
        Me.txt191.Value = ""
    MsgBox "DVs wurden gelöscht!"
   End If
End Sub

Private Sub btn_entfernenrez6_Click()
Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept6 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt193.Value = ""
        Me.txt194.Value = ""
        Me.txt195.Value = ""
        Me.txt196.Value = ""
        Me.txt197.Value = ""
        Me.txt198.Value = ""
        Me.txt199.Value = ""
        Me.txt200.Value = ""
        Me.txt201.Value = ""
        Me.txt202.Value = ""
        Me.txt203.Value = ""
        Me.txt204.Value = ""
        Me.txt205.Value = ""
        Me.txt206.Value = ""
        Me.txt207.Value = ""
        Me.txt208.Value = ""
        Me.txt209.Value = ""
        Me.txt210.Value = ""
        Me.txt211.Value = ""
        Me.txt212.Value = ""
        Me.txt213.Value = ""
        Me.txt214.Value = ""
        Me.txt215.Value = ""
        Me.txt216.Value = ""
        Me.txt217.Value = ""
        Me.txt218.Value = ""
        Me.txt219.Value = ""
        Me.txt220.Value = ""
        Me.txt221.Value = ""
    MsgBox "DVs wurden gelöscht!"
   End If
End Sub
Private Sub btn_neu_Click()
   Dim lZeile As Long
   
    
     lZeile = 2
     
     Do While Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) <> ""
         lZeile = lZeile + 1
     Loop
    
     Tabelle1.Cells(lZeile, 1) = CStr("Neuer Eintrag Zeile " & lZeile)
    
   
     ListBox1.AddItem CStr("Neuer Eintrag Zeile " & lZeile)
    
     
     ListBox1.ListIndex = ListBox1.ListCount - 1
  
    
End Sub

Private Sub btn_delete_Click()
   Dim lZeile As Long
   Dim byWert As Byte
    byWert = MsgBox("Möchten Sie diesen Patienten mit all seinen Einträgen entfernen?", 1, " _
Patienten aus Datenbank entfernen")
    If byWert = 2 Or ListBox1.ListIndex = -1 Then
        MsgBox "Patient wurde nicht gelöscht!"
        Exit Sub
    ElseIf byWert = 1 Then
    
    
     
  
     
     lZeile = 2
     
     Do While Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) <> ""
    
         
         If ListBox1.Text = Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) Then
            
             
             Tabelle1.Rows(CStr(lZeile & ":" & lZeile)).delete
            
             
             Call UserForm_initialize
             If ListBox1.ListCount > 0 Then ListBox1.ListIndex = 0
            
             Exit Do
            
         End If
    
         lZeile = lZeile + 1
     Loop
    End If
    MsgBox "Patient erfolgreich gelöscht!"
End Sub
Private Sub btn_speichern_Click()
   Dim lZeile As Long
  
     
     If ListBox1.ListIndex = -1 Then Exit Sub
    
    
     If Trim(CStr(txt1.Text)) = "" Then
         
         MsgBox "Sie müssen mindestens einen Namen eingeben!", vbCritical + vbOKOnly, "FEHLER!"
       
         Exit Sub
     End If
     
     lZeile = 2
     
     Do While Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) <> ""
    
        
         If ListBox1.Text = Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) Then
            
             
             Tabelle1.Cells(lZeile, 1).Value = Trim(CStr(txt1.Text))
             Tabelle1.Cells(lZeile, 2).Value = txt2.Text
             Tabelle1.Cells(lZeile, 3).Value = txt3.Text
             Tabelle1.Cells(lZeile, 4).Value = txt4.Text
             Tabelle1.Cells(lZeile, 5).Value = txt5.Text
             Tabelle1.Cells(lZeile, 6).Value = txt6.Text
             Tabelle1.Cells(lZeile, 7).Value = txt7.Text
             Tabelle1.Cells(lZeile, 8).Value = txt8.Text
             Tabelle1.Cells(lZeile, 9).Value = txt9.Text
             Tabelle1.Cells(lZeile, 10).Value = txt10.Text
             Tabelle1.Cells(lZeile, 11).Value = txt11.Text
             Tabelle1.Cells(lZeile, 12).Value = txt12.Text
             Tabelle1.Cells(lZeile, 13).Value = txt13.Text
             Tabelle1.Cells(lZeile, 14).Value = txt14.Text
             Tabelle1.Cells(lZeile, 15).Value = txt15.Text
             Tabelle1.Cells(lZeile, 16).Value = txt16.Text
             Tabelle1.Cells(lZeile, 17).Value = txt17.Text
             Tabelle1.Cells(lZeile, 18).Value = txt18.Text
             Tabelle1.Cells(lZeile, 19).Value = txt19.Text
             Tabelle1.Cells(lZeile, 20).Value = txt20.Text
             Tabelle1.Cells(lZeile, 21).Value = txt21.Text
             Tabelle1.Cells(lZeile, 22).Value = txt22.Text
             Tabelle1.Cells(lZeile, 23).Value = txt23.Text
             Tabelle1.Cells(lZeile, 24).Value = txt24.Text
             Tabelle1.Cells(lZeile, 25).Value = txt25.Text
             Tabelle1.Cells(lZeile, 26).Value = txt26.Text
             Tabelle1.Cells(lZeile, 27).Value = txt27.Text
             Tabelle1.Cells(lZeile, 28).Value = txt28.Text
             Tabelle1.Cells(lZeile, 29).Value = txt29.Text
             Tabelle1.Cells(lZeile, 30).Value = txt30.Text
             Tabelle1.Cells(lZeile, 31).Value = txt31.Text
             Tabelle1.Cells(lZeile, 32).Value = txt32.Text
             Tabelle1.Cells(lZeile, 33).Value = txt33.Text
             Tabelle1.Cells(lZeile, 34).Value = txt34.Text
             Tabelle1.Cells(lZeile, 35).Value = txt35.Text
             Tabelle1.Cells(lZeile, 36).Value = txt36.Text
             Tabelle1.Cells(lZeile, 37).Value = txt37.Text
             Tabelle1.Cells(lZeile, 38).Value = txt38.Text
             Tabelle1.Cells(lZeile, 39).Value = txt39.Text
             Tabelle1.Cells(lZeile, 40).Value = txt40.Text
             Tabelle1.Cells(lZeile, 41).Value = txt41.Text
             Tabelle1.Cells(lZeile, 42).Value = txt42.Text
             Tabelle1.Cells(lZeile, 43).Value = txt43.Text
             Tabelle1.Cells(lZeile, 44).Value = txt44.Text
             Tabelle1.Cells(lZeile, 45).Value = txt45.Text
             Tabelle1.Cells(lZeile, 46).Value = txt46.Text
             Tabelle1.Cells(lZeile, 47).Value = txt47.Text
             Tabelle1.Cells(lZeile, 48).Value = txt48.Text
             Tabelle1.Cells(lZeile, 49).Value = txt49.Text
             Tabelle1.Cells(lZeile, 50).Value = txt50.Text
             Tabelle1.Cells(lZeile, 51).Value = txt51.Text
             Tabelle1.Cells(lZeile, 52).Value = txt52.Text
             Tabelle1.Cells(lZeile, 53).Value = txt53.Text
             Tabelle1.Cells(lZeile, 54).Value = txt54.Text
             Tabelle1.Cells(lZeile, 55).Value = txt55.Text
             Tabelle1.Cells(lZeile, 56).Value = txt56.Text
             Tabelle1.Cells(lZeile, 57).Value = txt57.Text
             Tabelle1.Cells(lZeile, 58).Value = txt58.Text
             Tabelle1.Cells(lZeile, 59).Value = txt59.Text
             Tabelle1.Cells(lZeile, 60).Value = txt60.Text
             Tabelle1.Cells(lZeile, 61).Value = txt61.Text
             Tabelle1.Cells(lZeile, 62).Value = txt62.Text
             Tabelle1.Cells(lZeile, 63).Value = txt63.Text
             Tabelle1.Cells(lZeile, 64).Value = txt64.Text
             Tabelle1.Cells(lZeile, 65).Value = txt65.Text
             Tabelle1.Cells(lZeile, 66).Value = txt66.Text
             Tabelle1.Cells(lZeile, 67).Value = txt67.Text
             Tabelle1.Cells(lZeile, 68).Value = txt68.Text
             Tabelle1.Cells(lZeile, 69).Value = txt69.Text
             Tabelle1.Cells(lZeile, 70).Value = txt70.Text
             Tabelle1.Cells(lZeile, 71).Value = txt71.Text
             Tabelle1.Cells(lZeile, 72).Value = txt72.Text
             Tabelle1.Cells(lZeile, 73).Value = txt73.Text
             Tabelle1.Cells(lZeile, 74).Value = txt74.Text
             Tabelle1.Cells(lZeile, 75).Value = txt75.Text
             Tabelle1.Cells(lZeile, 76).Value = txt76.Text
             Tabelle1.Cells(lZeile, 77).Value = txt77.Text
             Tabelle1.Cells(lZeile, 78).Value = txt78.Text
             Tabelle1.Cells(lZeile, 79).Value = txt79.Text
             Tabelle1.Cells(lZeile, 80).Value = txt80.Text
             Tabelle1.Cells(lZeile, 81).Value = txt81.Text
             Tabelle1.Cells(lZeile, 82).Value = txt82.Text
             Tabelle1.Cells(lZeile, 83).Value = txt83.Text
             Tabelle1.Cells(lZeile, 84).Value = txt84.Text
             Tabelle1.Cells(lZeile, 85).Value = txt85.Text
             Tabelle1.Cells(lZeile, 86).Value = txt86.Text
             Tabelle1.Cells(lZeile, 87).Value = txt87.Text
             Tabelle1.Cells(lZeile, 88).Value = txt88.Text
             Tabelle1.Cells(lZeile, 89).Value = txt89.Text
             Tabelle1.Cells(lZeile, 90).Value = txt90.Text
             Tabelle1.Cells(lZeile, 91).Value = txt91.Text
             Tabelle1.Cells(lZeile, 92).Value = txt92.Text
             Tabelle1.Cells(lZeile, 93).Value = txt93.Text
             Tabelle1.Cells(lZeile, 94).Value = txt94.Text
             Tabelle1.Cells(lZeile, 95).Value = txt95.Text
             Tabelle1.Cells(lZeile, 96).Value = txt96.Text
             Tabelle1.Cells(lZeile, 97).Value = txt97.Text
             Tabelle1.Cells(lZeile, 98).Value = txt98.Text
             Tabelle1.Cells(lZeile, 99).Value = txt99.Text
             Tabelle1.Cells(lZeile, 100).Value = txt100.Text
             Tabelle1.Cells(lZeile, 101).Value = txt101.Text
             Tabelle1.Cells(lZeile, 102).Value = txt102.Text
             Tabelle1.Cells(lZeile, 103).Value = txt103.Text
             Tabelle1.Cells(lZeile, 104).Value = txt104.Text
             Tabelle1.Cells(lZeile, 105).Value = txt105.Text
             Tabelle1.Cells(lZeile, 106).Value = txt106.Text
             Tabelle1.Cells(lZeile, 107).Value = txt107.Text
             Tabelle1.Cells(lZeile, 108).Value = txt108.Text
             Tabelle1.Cells(lZeile, 109).Value = txt109.Text
             Tabelle1.Cells(lZeile, 110).Value = txt110.Text
             Tabelle1.Cells(lZeile, 111).Value = txt111.Text
             Tabelle1.Cells(lZeile, 112).Value = txt112.Text
             Tabelle1.Cells(lZeile, 113).Value = txt113.Text
             Tabelle1.Cells(lZeile, 114).Value = txt114.Text
             Tabelle1.Cells(lZeile, 115).Value = txt115.Text
             Tabelle1.Cells(lZeile, 116).Value = txt116.Text
             Tabelle1.Cells(lZeile, 117).Value = txt117.Text
             Tabelle1.Cells(lZeile, 118).Value = txt118.Text
             Tabelle1.Cells(lZeile, 119).Value = txt119.Text
             Tabelle1.Cells(lZeile, 120).Value = txt120.Text
             Tabelle1.Cells(lZeile, 121).Value = txt121.Text
             Tabelle1.Cells(lZeile, 122).Value = txt122.Text
             Tabelle1.Cells(lZeile, 123).Value = txt123.Text
             Tabelle1.Cells(lZeile, 124).Value = txt124.Text
             Tabelle1.Cells(lZeile, 125).Value = txt125.Text
             Tabelle1.Cells(lZeile, 126).Value = txt126.Text
             Tabelle1.Cells(lZeile, 127).Value = txt127.Text
             Tabelle1.Cells(lZeile, 128).Value = txt128.Text
             Tabelle1.Cells(lZeile, 129).Value = txt129.Text
             Tabelle1.Cells(lZeile, 130).Value = txt130.Text
             Tabelle1.Cells(lZeile, 131).Value = txt131.Text
             Tabelle1.Cells(lZeile, 132).Value = txt132.Text
             Tabelle1.Cells(lZeile, 133).Value = txt133.Text
             Tabelle1.Cells(lZeile, 134).Value = txt134.Text
             Tabelle1.Cells(lZeile, 135).Value = txt135.Text
             Tabelle1.Cells(lZeile, 136).Value = txt136.Text
             Tabelle1.Cells(lZeile, 137).Value = txt137.Text
             Tabelle1.Cells(lZeile, 138).Value = txt138.Text
             Tabelle1.Cells(lZeile, 139).Value = txt139.Text
             Tabelle1.Cells(lZeile, 140).Value = txt140.Text
             Tabelle1.Cells(lZeile, 141).Value = txt141.Text
             Tabelle1.Cells(lZeile, 142).Value = txt142.Text
             Tabelle1.Cells(lZeile, 143).Value = txt143.Text
             Tabelle1.Cells(lZeile, 144).Value = txt144.Text
             Tabelle1.Cells(lZeile, 145).Value = txt145.Text
             Tabelle1.Cells(lZeile, 146).Value = txt146.Text
             Tabelle1.Cells(lZeile, 147).Value = txt147.Text
             Tabelle1.Cells(lZeile, 148).Value = txt148.Text
             Tabelle1.Cells(lZeile, 149).Value = txt149.Text
             Tabelle1.Cells(lZeile, 150).Value = txt150.Text
             Tabelle1.Cells(lZeile, 151).Value = txt151.Text
             Tabelle1.Cells(lZeile, 152).Value = txt152.Text
             Tabelle1.Cells(lZeile, 153).Value = txt153.Text
             Tabelle1.Cells(lZeile, 154).Value = txt154.Text
             Tabelle1.Cells(lZeile, 155).Value = txt155.Text
             Tabelle1.Cells(lZeile, 156).Value = txt156.Text
             Tabelle1.Cells(lZeile, 157).Value = txt157.Text
             Tabelle1.Cells(lZeile, 158).Value = txt158.Text
             Tabelle1.Cells(lZeile, 159).Value = txt159.Text
             Tabelle1.Cells(lZeile, 160).Value = txt160.Text
             Tabelle1.Cells(lZeile, 161).Value = txt161.Text
             Tabelle1.Cells(lZeile, 162).Value = txt162.Text
             Tabelle1.Cells(lZeile, 163).Value = txt163.Text
             Tabelle1.Cells(lZeile, 164).Value = txt164.Text
             Tabelle1.Cells(lZeile, 165).Value = txt165.Text
             Tabelle1.Cells(lZeile, 166).Value = txt166.Text
             Tabelle1.Cells(lZeile, 167).Value = txt167.Text
             Tabelle1.Cells(lZeile, 168).Value = txt168.Text
             Tabelle1.Cells(lZeile, 169).Value = txt169.Text
             Tabelle1.Cells(lZeile, 170).Value = txt170.Text
             Tabelle1.Cells(lZeile, 171).Value = txt171.Text
             Tabelle1.Cells(lZeile, 172).Value = txt172.Text
             Tabelle1.Cells(lZeile, 173).Value = txt173.Text
             Tabelle1.Cells(lZeile, 174).Value = txt174.Text
             Tabelle1.Cells(lZeile, 175).Value = txt175.Text
             Tabelle1.Cells(lZeile, 176).Value = txt176.Text
             Tabelle1.Cells(lZeile, 177).Value = txt177.Text
             Tabelle1.Cells(lZeile, 178).Value = txt178.Text
             Tabelle1.Cells(lZeile, 179).Value = txt179.Text
             Tabelle1.Cells(lZeile, 180).Value = txt180.Text
             Tabelle1.Cells(lZeile, 181).Value = txt181.Text
             Tabelle1.Cells(lZeile, 182).Value = txt182.Text
             Tabelle1.Cells(lZeile, 183).Value = txt183.Text
             Tabelle1.Cells(lZeile, 184).Value = txt184.Text
             Tabelle1.Cells(lZeile, 185).Value = txt185.Text
             Tabelle1.Cells(lZeile, 186).Value = txt186.Text
             Tabelle1.Cells(lZeile, 187).Value = txt187.Text
             Tabelle1.Cells(lZeile, 188).Value = txt188.Text
             Tabelle1.Cells(lZeile, 189).Value = txt189.Text
             Tabelle1.Cells(lZeile, 190).Value = txt190.Text
             Tabelle1.Cells(lZeile, 191).Value = txt191.Text
             Tabelle1.Cells(lZeile, 192).Value = txt192.Text
             Tabelle1.Cells(lZeile, 193).Value = txt193.Text
             Tabelle1.Cells(lZeile, 194).Value = txt194.Text
             Tabelle1.Cells(lZeile, 195).Value = txt195.Text
             Tabelle1.Cells(lZeile, 196).Value = txt196.Text
             Tabelle1.Cells(lZeile, 197).Value = txt197.Text
             Tabelle1.Cells(lZeile, 198).Value = txt198.Text
             Tabelle1.Cells(lZeile, 199).Value = txt199.Text
             Tabelle1.Cells(lZeile, 200).Value = txt200.Text
             Tabelle1.Cells(lZeile, 201).Value = txt201.Text
             Tabelle1.Cells(lZeile, 202).Value = txt202.Text
             Tabelle1.Cells(lZeile, 203).Value = txt203.Text
             Tabelle1.Cells(lZeile, 204).Value = txt204.Text
             Tabelle1.Cells(lZeile, 205).Value = txt205.Text
             Tabelle1.Cells(lZeile, 206).Value = txt206.Text
             Tabelle1.Cells(lZeile, 207).Value = txt207.Text
             Tabelle1.Cells(lZeile, 208).Value = txt208.Text
             Tabelle1.Cells(lZeile, 209).Value = txt209.Text
             Tabelle1.Cells(lZeile, 210).Value = txt210.Text
             Tabelle1.Cells(lZeile, 211).Value = txt211.Text
             Tabelle1.Cells(lZeile, 212).Value = txt212.Text
             Tabelle1.Cells(lZeile, 213).Value = txt213.Text
             Tabelle1.Cells(lZeile, 214).Value = txt214.Text
             Tabelle1.Cells(lZeile, 215).Value = txt215.Text
             Tabelle1.Cells(lZeile, 216).Value = txt216.Text
             Tabelle1.Cells(lZeile, 217).Value = txt217.Text
             Tabelle1.Cells(lZeile, 218).Value = txt218.Text
             Tabelle1.Cells(lZeile, 219).Value = txt219.Text
             Tabelle1.Cells(lZeile, 220).Value = txt220.Text
             Tabelle1.Cells(lZeile, 221).Value = txt221.Text
            
            
            
             If ListBox1.Text <> Trim(CStr(txt1.Text)) Then
                 Call UserForm_initialize
                 If ListBox1.ListCount > 0 Then ListBox1.ListIndex = 0
             End If
            
             Exit Do
            
         End If
    
         lZeile = lZeile + 1
     Loop
    
End Sub
Private Sub btn_beenden_Click()
     Unload Me
     
End Sub

Private Sub btn_aufteilenrez1_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt42.Value And Me.txt7.Value = 3 And Me.txt9.Value = 30 Then
         Me.txt43.Value = 10
         Me.txt47.Value = DateAdd("d", 28, Me.txt42.Value)
         Me.txt48.Value = 10
         Me.txt52.Value = DateAdd("d", 56, Me.txt42.Value)
         Me.txt53.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt42.Value And Me.txt7.Value = 3 And Me.txt9.Value = 3 Then
         Me.txt43.Value = 1
         Me.txt47.Value = DateAdd("d", 28, Me.txt42.Value)
         Me.txt48.Value = 1
         Me.txt52.Value = DateAdd("d", 56, Me.txt42.Value)
         Me.txt53.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt42.Value And Me.txt7.Value = 6 And Me.txt9.Value = 60 Then
         Me.txt43.Value = 10
         Me.txt47.Value = DateAdd("d", 28, Me.txt42.Value)
         Me.txt48.Value = 10
         Me.txt52.Value = DateAdd("d", 56, Me.txt42.Value)
         Me.txt53.Value = 10
         Me.txt57.Value = DateAdd("d", 84, Me.txt42.Value)
         Me.txt58.Value = 10
         Me.txt62.Value = DateAdd("d", 112, Me.txt42.Value)
         Me.txt63.Value = 10
         Me.txt67.Value = DateAdd("d", 140, Me.txt42.Value)
         Me.txt68.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt42.Value And Me.txt7.Value = 6 And Me.txt9.Value = 6 Then
         Me.txt43.Value = 1
         Me.txt47.Value = DateAdd("d", 28, Me.txt42.Value)
         Me.txt48.Value = 1
         Me.txt52.Value = DateAdd("d", 56, Me.txt42.Value)
         Me.txt53.Value = 1
         Me.txt57.Value = DateAdd("d", 84, Me.txt42.Value)
         Me.txt58.Value = 1
         Me.txt62.Value = DateAdd("d", 112, Me.txt42.Value)
         Me.txt63.Value = 1
         Me.txt67.Value = DateAdd("d", 140, Me.txt42.Value)
         Me.txt68.Value = 1
         Else
         End If
         If Me.txt42.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt7.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept 1,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt42.Text = "" And Me.txt7.Text = "" Then
         MsgBox "Bitte bei Rezept 1 die DV und bei DV1 von Rezept1 ein Datum angeben!"
         Else
         End If
         If Me.txt9.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept1 ein!"
         Else
         Exit Sub
         End If
End Sub

Private Sub btn_entfernenrez1_Click()
    Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept1 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt43.Value = ""
        Me.txt44.Value = ""
        Me.txt45.Value = ""
        Me.txt46.Value = ""
        Me.txt47.Value = ""
        Me.txt48.Value = ""
        Me.txt49.Value = ""
        Me.txt50.Value = ""
        Me.txt51.Value = ""
        Me.txt52.Value = ""
        Me.txt53.Value = ""
        Me.txt54.Value = ""
        Me.txt55.Value = ""
        Me.txt56.Value = ""
        Me.txt57.Value = ""
        Me.txt58.Value = ""
        Me.txt59.Value = ""
        Me.txt60.Value = ""
        Me.txt61.Value = ""
        Me.txt62.Value = ""
        Me.txt63.Value = ""
        Me.txt64.Value = ""
        Me.txt65.Value = ""
        Me.txt66.Value = ""
        Me.txt67.Value = ""
        Me.txt68.Value = ""
        Me.txt69.Value = ""
        Me.txt70.Value = ""
        Me.txt71.Value = ""
    End If
End Sub

Private Sub btn_entfernenrez2_Click()
 Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept2 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt73.Value = ""
        Me.txt74.Value = ""
        Me.txt75.Value = ""
        Me.txt76.Value = ""
        Me.txt77.Value = ""
        Me.txt78.Value = ""
        Me.txt79.Value = ""
        Me.txt80.Value = ""
        Me.txt81.Value = ""
        Me.txt82.Value = ""
        Me.txt83.Value = ""
        Me.txt84.Value = ""
        Me.txt85.Value = ""
        Me.txt86.Value = ""
        Me.txt87.Value = ""
        Me.txt88.Value = ""
        Me.txt89.Value = ""
        Me.txt90.Value = ""
        Me.txt91.Value = ""
        Me.txt92.Value = ""
        Me.txt93.Value = ""
        Me.txt94.Value = ""
        Me.txt95.Value = ""
        Me.txt96.Value = ""
        Me.txt97.Value = ""
        Me.txt98.Value = ""
        Me.txt99.Value = ""
        Me.txt100.Value = ""
        Me.txt101.Value = ""
    MsgBox "DVs wurden gelöscht!"
   End If
   
End Sub

Private Sub btn_entfernenrez3_Click()
Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept3 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt103.Value = ""
        Me.txt104.Value = ""
        Me.txt105.Value = ""
        Me.txt106.Value = ""
        Me.txt107.Value = ""
        Me.txt108.Value = ""
        Me.txt109.Value = ""
        Me.txt110.Value = ""
        Me.txt111.Value = ""
        Me.txt112.Value = ""
        Me.txt113.Value = ""
        Me.txt114.Value = ""
        Me.txt115.Value = ""
        Me.txt116.Value = ""
        Me.txt117.Value = ""
        Me.txt118.Value = ""
        Me.txt119.Value = ""
        Me.txt120.Value = ""
        Me.txt121.Value = ""
        Me.txt122.Value = ""
        Me.txt123.Value = ""
        Me.txt124.Value = ""
        Me.txt125.Value = ""
        Me.txt126.Value = ""
        Me.txt127.Value = ""
        Me.txt128.Value = ""
        Me.txt129.Value = ""
        Me.txt130.Value = ""
        Me.txt131.Value = ""
    MsgBox "DVs wurden gelöscht!"
   End If
End Sub

Private Sub btn_aufteilenrez4_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt132.Value And Me.txt22.Value = 3 And Me.txt24.Value = 30 Then
         Me.txt133.Value = 10
         Me.txt137.Value = DateAdd("d", 28, Me.txt132.Value)
         Me.txt138.Value = 10
         Me.txt142.Value = DateAdd("d", 56, Me.txt132.Value)
         Me.txt143.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt132.Value And Me.txt22.Value = 3 And Me.txt24.Value = 3 Then
         Me.txt133.Value = 1
         Me.txt137.Value = DateAdd("d", 28, Me.txt132.Value)
         Me.txt138.Value = 1
         Me.txt142.Value = DateAdd("d", 56, Me.txt132.Value)
         Me.txt143.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt132.Value And Me.txt22.Value = 6 And Me.txt24.Value = 60 Then
         Me.txt133.Value = 10
         Me.txt137.Value = DateAdd("d", 28, Me.txt132.Value)
         Me.txt138.Value = 10
         Me.txt142.Value = DateAdd("d", 56, Me.txt132.Value)
         Me.txt143.Value = 10
         Me.txt147.Value = DateAdd("d", 84, Me.txt132.Value)
         Me.txt148.Value = 10
         Me.txt152.Value = DateAdd("d", 112, Me.txt132.Value)
         Me.txt153.Value = 10
         Me.txt157.Value = DateAdd("d", 140, Me.txt132.Value)
         Me.txt158.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt132.Value And Me.txt22.Value = 6 And Me.txt24.Value = 6 Then
         Me.txt133.Value = 1
         Me.txt137.Value = DateAdd("d", 28, Me.txt132.Value)
         Me.txt138.Value = 1
         Me.txt142.Value = DateAdd("d", 56, Me.txt132.Value)
         Me.txt143.Value = 1
         Me.txt147.Value = DateAdd("d", 84, Me.txt132.Value)
         Me.txt148.Value = 1
         Me.txt152.Value = DateAdd("d", 112, Me.txt132.Value)
         Me.txt153.Value = 1
         Me.txt157.Value = DateAdd("d", 140, Me.txt132.Value)
         Me.txt158.Value = 1
         Else
         End If
         If Me.txt132.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt22.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept4,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt132.Text = "" And Me.txt22.Text = "" Then
         MsgBox "Bitte die DV bei Rezept4 eintragen und bei DV1 ein Datum angeben!"
         Else
         End If
         If Me.txt24.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept4 ein!"
         Else
         Exit Sub
         End If
End Sub

Private Sub btn_entfernenrez4_Click()
Dim byWert As Byte
    byWert = MsgBox("Möchten Sie wirklich alle Einträge für Rezept4 entfernen?", 1, "Löschen")
    If byWert = 2 Then
        MsgBox "DVs wurden nicht gelöscht!"
    ElseIf byWert = 1 Then
        Me.txt133.Value = ""
        Me.txt134.Value = ""
        Me.txt135.Value = ""
        Me.txt136.Value = ""
        Me.txt137.Value = ""
        Me.txt138.Value = ""
        Me.txt139.Value = ""
        Me.txt140.Value = ""
        Me.txt141.Value = ""
        Me.txt142.Value = ""
        Me.txt143.Value = ""
        Me.txt144.Value = ""
        Me.txt145.Value = ""
        Me.txt146.Value = ""
        Me.txt147.Value = ""
        Me.txt148.Value = ""
        Me.txt149.Value = ""
        Me.txt150.Value = ""
        Me.txt151.Value = ""
        Me.txt152.Value = ""
        Me.txt153.Value = ""
        Me.txt154.Value = ""
        Me.txt155.Value = ""
        Me.txt156.Value = ""
        Me.txt157.Value = ""
        Me.txt158.Value = ""
        Me.txt159.Value = ""
        Me.txt160.Value = ""
        Me.txt161.Value = ""
    MsgBox "DVs wurden gelöscht!"
   End If
End Sub

Private Sub btn_aufteilenrez5_Click()
Dim sDatum As Date
 If IsDate(sDatum) = Me.txt162.Value And Me.txt27.Value = 3 And Me.txt29.Value = 30 Then
         Me.txt163.Value = 10
         Me.txt167.Value = DateAdd("d", 28, Me.txt162.Value)
         Me.txt168.Value = 10
         Me.txt172.Value = DateAdd("d", 56, Me.txt162.Value)
         Me.txt173.Value = 10
         Else
         End If
 If IsDate(sDatum) = Me.txt162.Value And Me.txt27.Value = 3 And Me.txt29.Value = 3 Then
         Me.txt163.Value = 1
         Me.txt167.Value = DateAdd("d", 28, Me.txt162.Value)
         Me.txt168.Value = 1
         Me.txt172.Value = DateAdd("d", 56, Me.txt162.Value)
         Me.txt173.Value = 1
         Else
         End If
 If IsDate(sDatum) = Me.txt162.Value And Me.txt27.Value = 6 And Me.txt29.Value = 60 Then
         Me.txt163.Value = 10
         Me.txt167.Value = DateAdd("d", 28, Me.txt162.Value)
         Me.txt168.Value = 10
         Me.txt172.Value = DateAdd("d", 56, Me.txt162.Value)
         Me.txt173.Value = 10
         Me.txt177.Value = DateAdd("d", 84, Me.txt162.Value)
         Me.txt178.Value = 10
         Me.txt182.Value = DateAdd("d", 112, Me.txt162.Value)
         Me.txt183.Value = 10
         Me.txt187.Value = DateAdd("d", 140, Me.txt162.Value)
         Me.txt188.Value = 10
         Else
         End If
If IsDate(sDatum) = Me.txt162.Value And Me.txt27.Value = 6 And Me.txt29.Value = 6 Then
         Me.txt163.Value = 1
         Me.txt167.Value = DateAdd("d", 28, Me.txt162.Value)
         Me.txt168.Value = 1
         Me.txt172.Value = DateAdd("d", 56, Me.txt162.Value)
         Me.txt173.Value = 1
         Me.txt177.Value = DateAdd("d", 84, Me.txt162.Value)
         Me.txt178.Value = 1
         Me.txt182.Value = DateAdd("d", 112, Me.txt162.Value)
         Me.txt183.Value = 1
         Me.txt187.Value = DateAdd("d", 140, Me.txt162.Value)
         Me.txt188.Value = 1
         Else
         End If
         If Me.txt162.Value = "" Then
         MsgBox "Sie haben das DV1 Datum nicht eingetragen!"
         Else
         End If
         If Me.txt27.Text = "" Then
         MsgBox "Bitte prüfen Sie die DV bei Rezept5,  bitte 3 oder 6 angeben!"
         Else
         End If
         If Me.txt162.Text = "" And Me.txt27.Text = "" Then
         MsgBox "Bitte die DV bei Rezept5 eintragen und bei DV1 ein Datum angeben!"
         Else
         End If
         If Me.txt29.Text = "" Then
         MsgBox "Bitte tragen Sie eine Menge bei Rezept5 ein!"
         Else
         Exit Sub
         End If
End Sub
Private Sub ListBox1_Click()
   Dim lZeile As Long
    
     txt1 = ""
     txt2 = ""
     txt3 = ""
     txt4 = ""
     txt5 = ""
     txt6 = ""
     txt7 = ""
     txt8 = ""
     txt9 = ""
     txt10 = ""
     txt11 = ""
     txt12 = ""
     txt13 = ""
     txt14 = ""
     txt15 = ""
     txt16 = ""
     txt17 = ""
     txt18 = ""
     txt19 = ""
     txt20 = ""
     txt21 = ""
     txt22 = ""
     txt23 = ""
     txt24 = ""
     txt25 = ""
     txt26 = ""
     txt27 = ""
     txt28 = ""
     txt29 = ""
     txt30 = ""
     txt31 = ""
     txt32 = ""
     txt33 = ""
     txt34 = ""
     txt35 = ""
     txt36 = ""
     txt37 = ""
     txt38 = ""
     txt39 = ""
     txt40 = ""
     txt41 = ""
     txt42 = ""
     txt43 = ""
     txt44 = ""
     txt45 = ""
     txt46 = ""
     txt47 = ""
     txt48 = ""
     txt49 = ""
     txt50 = ""
     txt51 = ""
     txt52 = ""
     txt53 = ""
     txt54 = ""
     txt55 = ""
     txt56 = ""
     txt57 = ""
     txt58 = ""
     txt59 = ""
     txt60 = ""
     txt61 = ""
     txt62 = ""
     txt63 = ""
     txt64 = ""
     txt65 = ""
     txt66 = ""
     txt67 = ""
     txt68 = ""
     txt69 = ""
     txt70 = ""
     txt71 = ""
     txt72 = ""
     txt73 = ""
     txt74 = ""
     txt75 = ""
     txt76 = ""
     txt77 = ""
     txt78 = ""
     txt79 = ""
     txt80 = ""
     txt81 = ""
     txt82 = ""
     txt83 = ""
     txt84 = ""
     txt85 = ""
     txt86 = ""
     txt87 = ""
     txt88 = ""
     txt89 = ""
     txt90 = ""
     txt91 = ""
     txt92 = ""
     txt93 = ""
     txt94 = ""
     txt95 = ""
     txt96 = ""
     txt97 = ""
     txt98 = ""
     txt99 = ""
     txt100 = ""
     txt101 = ""
     txt102 = ""
     txt103 = ""
     txt104 = ""
     txt105 = ""
     txt106 = ""
     txt107 = ""
     txt108 = ""
     txt109 = ""
     txt111 = ""
     txt112 = ""
     txt113 = ""
     txt113 = ""
     txt114 = ""
     txt115 = ""
     txt116 = ""
     txt117 = ""
     txt118 = ""
     txt119 = ""
     txt120 = ""
     txt121 = ""
     txt122 = ""
     txt123 = ""
     txt124 = ""
     txt125 = ""
     txt126 = ""
     txt127 = ""
     txt128 = ""
     txt129 = ""
     txt130 = ""
     txt131 = ""
     txt132 = ""
     txt133 = ""
     txt134 = ""
     txt135 = ""
     txt136 = ""
     txt137 = ""
     txt138 = ""
     txt139 = ""
     txt140 = ""
     txt141 = ""
     txt142 = ""
     txt143 = ""
     txt144 = ""
     txt145 = ""
     txt146 = ""
     txt147 = ""
     txt148 = ""
     txt149 = ""
     txt150 = ""
     txt151 = ""
     txt152 = ""
     txt153 = ""
     txt154 = ""
     txt155 = ""
     txt156 = ""
     txt157 = ""
     txt158 = ""
     txt159 = ""
     txt160 = ""
     txt161 = ""
     txt162 = ""
     txt163 = ""
     txt164 = ""
     txt165 = ""
     txt166 = ""
     txt167 = ""
     txt168 = ""
     txt169 = ""
     txt170 = ""
     txt171 = ""
     txt172 = ""
     txt173 = ""
     txt174 = ""
     txt175 = ""
     txt176 = ""
     txt177 = ""
     txt178 = ""
     txt179 = ""
     txt180 = ""
     txt181 = ""
     txt182 = ""
     txt183 = ""
     txt184 = ""
     txt185 = ""
     txt186 = ""
     txt187 = ""
     txt188 = ""
     txt189 = ""
     txt190 = ""
     txt191 = ""
     txt192 = ""
     txt193 = ""
     txt194 = ""
     txt195 = ""
     txt196 = ""
     txt197 = ""
     txt198 = ""
     txt199 = ""
     txt200 = ""
     txt201 = ""
     txt202 = ""
     txt203 = ""
     txt204 = ""
     txt205 = ""
     txt206 = ""
     txt207 = ""
     txt208 = ""
     txt209 = ""
     txt211 = ""
     txt212 = ""
     txt213 = ""
     txt213 = ""
     txt214 = ""
     txt215 = ""
     txt216 = ""
     txt217 = ""
     txt218 = ""
     txt219 = ""
     txt220 = ""
     txt221 = ""
     
     
    
    
     If ListBox1.ListIndex >= 0 Then
    
         lZeile = 2
         
         Do While Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) <> ""
        
          
             If ListBox1.Text = Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) Then
            
                 
                 txt1 = Trim(CStr(Tabelle1.Cells(lZeile, 1).Value))
                 txt2 = Tabelle1.Cells(lZeile, 2).Value
                 txt3 = Tabelle1.Cells(lZeile, 3).Value
                 txt4 = Tabelle1.Cells(lZeile, 4).Value
                 txt5 = Tabelle1.Cells(lZeile, 5).Value
                 txt6 = Tabelle1.Cells(lZeile, 6).Value
                 txt7 = Tabelle1.Cells(lZeile, 7).Value
                 txt8 = Tabelle1.Cells(lZeile, 8).Value
                 txt9 = Tabelle1.Cells(lZeile, 9).Value
                 txt10 = Tabelle1.Cells(lZeile, 10).Value
                 txt11 = Tabelle1.Cells(lZeile, 11).Value
                 txt12 = Tabelle1.Cells(lZeile, 12).Value
                 txt13 = Tabelle1.Cells(lZeile, 13).Value
                 txt14 = Tabelle1.Cells(lZeile, 14).Value
                 txt15 = Tabelle1.Cells(lZeile, 15).Value
                 txt16 = Tabelle1.Cells(lZeile, 16).Value
                 txt17 = Tabelle1.Cells(lZeile, 17).Value
                 txt18 = Tabelle1.Cells(lZeile, 18).Value
                 txt19 = Tabelle1.Cells(lZeile, 19).Value
                 txt20 = Tabelle1.Cells(lZeile, 20).Value
                 txt21 = Tabelle1.Cells(lZeile, 21).Value
                 txt22 = Tabelle1.Cells(lZeile, 22).Value
                 txt23 = Tabelle1.Cells(lZeile, 23).Value
                 txt24 = Tabelle1.Cells(lZeile, 24).Value
                 txt25 = Tabelle1.Cells(lZeile, 25).Value
                 txt26 = Tabelle1.Cells(lZeile, 26).Value
                 txt27 = Tabelle1.Cells(lZeile, 27).Value
                 txt28 = Tabelle1.Cells(lZeile, 28).Value
                 txt29 = Tabelle1.Cells(lZeile, 29).Value
                 txt30 = Tabelle1.Cells(lZeile, 30).Value
                 txt31 = Tabelle1.Cells(lZeile, 31).Value
                 txt32 = Tabelle1.Cells(lZeile, 32).Value
                 txt33 = Tabelle1.Cells(lZeile, 33).Value
                 txt34 = Tabelle1.Cells(lZeile, 34).Value
                 txt35 = Tabelle1.Cells(lZeile, 35).Value
                 txt36 = Tabelle1.Cells(lZeile, 36).Value
                 txt37 = Tabelle1.Cells(lZeile, 37).Value
                 txt38 = Tabelle1.Cells(lZeile, 38).Value
                 txt39 = Tabelle1.Cells(lZeile, 39).Value
                 txt40 = Tabelle1.Cells(lZeile, 40).Value
                 txt41 = Tabelle1.Cells(lZeile, 41).Value
                 txt42 = Tabelle1.Cells(lZeile, 42).Value
                 txt43 = Tabelle1.Cells(lZeile, 43).Value
                 txt44 = Tabelle1.Cells(lZeile, 44).Value
                 txt45 = Tabelle1.Cells(lZeile, 45).Value
                 txt46 = Tabelle1.Cells(lZeile, 46).Value
                 txt47 = Tabelle1.Cells(lZeile, 47).Value
                 txt48 = Tabelle1.Cells(lZeile, 48).Value
                 txt49 = Tabelle1.Cells(lZeile, 49).Value
                 txt50 = Tabelle1.Cells(lZeile, 50).Value
                 txt51 = Tabelle1.Cells(lZeile, 51).Value
                 txt52 = Tabelle1.Cells(lZeile, 52).Value
                 txt53 = Tabelle1.Cells(lZeile, 53).Value
                 txt54 = Tabelle1.Cells(lZeile, 54).Value
                 txt55 = Tabelle1.Cells(lZeile, 55).Value
                 txt56 = Tabelle1.Cells(lZeile, 56).Value
                 txt57 = Tabelle1.Cells(lZeile, 57).Value
                 txt58 = Tabelle1.Cells(lZeile, 58).Value
                 txt59 = Tabelle1.Cells(lZeile, 59).Value
                 txt60 = Tabelle1.Cells(lZeile, 60).Value
                 txt61 = Tabelle1.Cells(lZeile, 61).Value
                 txt62 = Tabelle1.Cells(lZeile, 62).Value
                 txt63 = Tabelle1.Cells(lZeile, 63).Value
                 txt64 = Tabelle1.Cells(lZeile, 64).Value
                 txt65 = Tabelle1.Cells(lZeile, 65).Value
                 txt66 = Tabelle1.Cells(lZeile, 66).Value
                 txt67 = Tabelle1.Cells(lZeile, 67).Value
                 txt68 = Tabelle1.Cells(lZeile, 68).Value
                 txt69 = Tabelle1.Cells(lZeile, 69).Value
                 txt70 = Tabelle1.Cells(lZeile, 70).Value
                 txt71 = Tabelle1.Cells(lZeile, 71).Value
                 txt72 = Tabelle1.Cells(lZeile, 72).Value
                 txt73 = Tabelle1.Cells(lZeile, 73).Value
                 txt74 = Tabelle1.Cells(lZeile, 74).Value
                 txt75 = Tabelle1.Cells(lZeile, 75).Value
                 txt76 = Tabelle1.Cells(lZeile, 76).Value
                 txt77 = Tabelle1.Cells(lZeile, 77).Value
                 txt78 = Tabelle1.Cells(lZeile, 78).Value
                 txt79 = Tabelle1.Cells(lZeile, 79).Value
                 txt80 = Tabelle1.Cells(lZeile, 80).Value
                 txt81 = Tabelle1.Cells(lZeile, 81).Value
                 txt82 = Tabelle1.Cells(lZeile, 82).Value
                 txt83 = Tabelle1.Cells(lZeile, 83).Value
                 txt84 = Tabelle1.Cells(lZeile, 84).Value
                 txt85 = Tabelle1.Cells(lZeile, 85).Value
                 txt86 = Tabelle1.Cells(lZeile, 86).Value
                 txt87 = Tabelle1.Cells(lZeile, 87).Value
                 txt88 = Tabelle1.Cells(lZeile, 88).Value
                 txt89 = Tabelle1.Cells(lZeile, 89).Value
                 txt90 = Tabelle1.Cells(lZeile, 90).Value
                 txt91 = Tabelle1.Cells(lZeile, 91).Value
                 txt92 = Tabelle1.Cells(lZeile, 92).Value
                 txt93 = Tabelle1.Cells(lZeile, 93).Value
                 txt94 = Tabelle1.Cells(lZeile, 94).Value
                 txt95 = Tabelle1.Cells(lZeile, 95).Value
                 txt96 = Tabelle1.Cells(lZeile, 96).Value
                 txt97 = Tabelle1.Cells(lZeile, 97).Value
                 txt98 = Tabelle1.Cells(lZeile, 98).Value
                 txt99 = Tabelle1.Cells(lZeile, 99).Value
                 txt100 = Tabelle1.Cells(lZeile, 100).Value
                 txt101 = Tabelle1.Cells(lZeile, 101).Value
                 txt102 = Tabelle1.Cells(lZeile, 102).Value
                 txt103 = Tabelle1.Cells(lZeile, 103).Value
                 txt104 = Tabelle1.Cells(lZeile, 104).Value
                 txt105 = Tabelle1.Cells(lZeile, 105).Value
                 txt106 = Tabelle1.Cells(lZeile, 106).Value
                 txt107 = Tabelle1.Cells(lZeile, 107).Value
                 txt108 = Tabelle1.Cells(lZeile, 108).Value
                 txt109 = Tabelle1.Cells(lZeile, 109).Value
                 txt110 = Tabelle1.Cells(lZeile, 110).Value
                 txt111 = Tabelle1.Cells(lZeile, 111).Value
                 txt112 = Tabelle1.Cells(lZeile, 112).Value
                 txt113 = Tabelle1.Cells(lZeile, 113).Value
                 txt114 = Tabelle1.Cells(lZeile, 114).Value
                 txt115 = Tabelle1.Cells(lZeile, 115).Value
                 txt116 = Tabelle1.Cells(lZeile, 116).Value
                 txt117 = Tabelle1.Cells(lZeile, 117).Value
                 txt118 = Tabelle1.Cells(lZeile, 118).Value
                 txt119 = Tabelle1.Cells(lZeile, 119).Value
                 txt120 = Tabelle1.Cells(lZeile, 120).Value
                 txt121 = Tabelle1.Cells(lZeile, 121).Value
                 txt122 = Tabelle1.Cells(lZeile, 122).Value
                 txt123 = Tabelle1.Cells(lZeile, 123).Value
                 txt124 = Tabelle1.Cells(lZeile, 124).Value
                 txt125 = Tabelle1.Cells(lZeile, 125).Value
                 txt126 = Tabelle1.Cells(lZeile, 126).Value
                 txt127 = Tabelle1.Cells(lZeile, 127).Value
                 txt128 = Tabelle1.Cells(lZeile, 128).Value
                 txt129 = Tabelle1.Cells(lZeile, 129).Value
                 txt130 = Tabelle1.Cells(lZeile, 130).Value
                 txt131 = Tabelle1.Cells(lZeile, 131).Value
                 txt132 = Tabelle1.Cells(lZeile, 132).Value
                 txt133 = Tabelle1.Cells(lZeile, 133).Value
                 txt134 = Tabelle1.Cells(lZeile, 134).Value
                 txt135 = Tabelle1.Cells(lZeile, 135).Value
                 txt136 = Tabelle1.Cells(lZeile, 136).Value
                 txt137 = Tabelle1.Cells(lZeile, 137).Value
                 txt138 = Tabelle1.Cells(lZeile, 138).Value
                 txt139 = Tabelle1.Cells(lZeile, 139).Value
                 txt140 = Tabelle1.Cells(lZeile, 140).Value
                 txt141 = Tabelle1.Cells(lZeile, 141).Value
                 txt142 = Tabelle1.Cells(lZeile, 142).Value
                 txt143 = Tabelle1.Cells(lZeile, 143).Value
                 txt144 = Tabelle1.Cells(lZeile, 144).Value
                 txt145 = Tabelle1.Cells(lZeile, 145).Value
                 txt146 = Tabelle1.Cells(lZeile, 146).Value
                 txt147 = Tabelle1.Cells(lZeile, 147).Value
                 txt148 = Tabelle1.Cells(lZeile, 148).Value
                 txt149 = Tabelle1.Cells(lZeile, 149).Value
                 txt150 = Tabelle1.Cells(lZeile, 150).Value
                 txt151 = Tabelle1.Cells(lZeile, 151).Value
                 txt152 = Tabelle1.Cells(lZeile, 152).Value
                 txt153 = Tabelle1.Cells(lZeile, 153).Value
                 txt154 = Tabelle1.Cells(lZeile, 154).Value
                 txt155 = Tabelle1.Cells(lZeile, 155).Value
                 txt156 = Tabelle1.Cells(lZeile, 156).Value
                 txt157 = Tabelle1.Cells(lZeile, 157).Value
                 txt158 = Tabelle1.Cells(lZeile, 158).Value
                 txt159 = Tabelle1.Cells(lZeile, 159).Value
                 txt160 = Tabelle1.Cells(lZeile, 160).Value
                 txt161 = Tabelle1.Cells(lZeile, 161).Value
                 txt162 = Tabelle1.Cells(lZeile, 162).Value
                 txt163 = Tabelle1.Cells(lZeile, 163).Value
                 txt164 = Tabelle1.Cells(lZeile, 164).Value
                 txt165 = Tabelle1.Cells(lZeile, 165).Value
                 txt166 = Tabelle1.Cells(lZeile, 166).Value
                 txt167 = Tabelle1.Cells(lZeile, 167).Value
                 txt168 = Tabelle1.Cells(lZeile, 168).Value
                 txt169 = Tabelle1.Cells(lZeile, 169).Value
                 txt170 = Tabelle1.Cells(lZeile, 170).Value
                 txt171 = Tabelle1.Cells(lZeile, 171).Value
                 txt172 = Tabelle1.Cells(lZeile, 172).Value
                 txt173 = Tabelle1.Cells(lZeile, 173).Value
                 txt174 = Tabelle1.Cells(lZeile, 174).Value
                 txt175 = Tabelle1.Cells(lZeile, 175).Value
                 txt176 = Tabelle1.Cells(lZeile, 176).Value
                 txt177 = Tabelle1.Cells(lZeile, 177).Value
                 txt178 = Tabelle1.Cells(lZeile, 178).Value
                 txt179 = Tabelle1.Cells(lZeile, 179).Value
                 txt180 = Tabelle1.Cells(lZeile, 180).Value
                 txt181 = Tabelle1.Cells(lZeile, 181).Value
                 txt182 = Tabelle1.Cells(lZeile, 182).Value
                 txt183 = Tabelle1.Cells(lZeile, 183).Value
                 txt184 = Tabelle1.Cells(lZeile, 184).Value
                 txt185 = Tabelle1.Cells(lZeile, 185).Value
                 txt186 = Tabelle1.Cells(lZeile, 186).Value
                 txt187 = Tabelle1.Cells(lZeile, 187).Value
                 txt188 = Tabelle1.Cells(lZeile, 188).Value
                 txt189 = Tabelle1.Cells(lZeile, 189).Value
                 txt190 = Tabelle1.Cells(lZeile, 190).Value
                 txt191 = Tabelle1.Cells(lZeile, 191).Value
                 txt192 = Tabelle1.Cells(lZeile, 192).Value
                 txt193 = Tabelle1.Cells(lZeile, 193).Value
                 txt194 = Tabelle1.Cells(lZeile, 194).Value
                 txt195 = Tabelle1.Cells(lZeile, 195).Value
                 txt196 = Tabelle1.Cells(lZeile, 196).Value
                 txt197 = Tabelle1.Cells(lZeile, 197).Value
                 txt198 = Tabelle1.Cells(lZeile, 198).Value
                 txt199 = Tabelle1.Cells(lZeile, 199).Value
                 txt200 = Tabelle1.Cells(lZeile, 200).Value
                 txt201 = Tabelle1.Cells(lZeile, 201).Value
                 txt202 = Tabelle1.Cells(lZeile, 202).Value
                 txt203 = Tabelle1.Cells(lZeile, 203).Value
                 txt204 = Tabelle1.Cells(lZeile, 204).Value
                 txt205 = Tabelle1.Cells(lZeile, 205).Value
                 txt206 = Tabelle1.Cells(lZeile, 206).Value
                 txt207 = Tabelle1.Cells(lZeile, 207).Value
                 txt208 = Tabelle1.Cells(lZeile, 208).Value
                 txt209 = Tabelle1.Cells(lZeile, 209).Value
                 txt210 = Tabelle1.Cells(lZeile, 210).Value
                 txt211 = Tabelle1.Cells(lZeile, 211).Value
                 txt212 = Tabelle1.Cells(lZeile, 212).Value
                 txt213 = Tabelle1.Cells(lZeile, 213).Value
                 txt214 = Tabelle1.Cells(lZeile, 214).Value
                 txt215 = Tabelle1.Cells(lZeile, 215).Value
                 txt216 = Tabelle1.Cells(lZeile, 216).Value
                 txt217 = Tabelle1.Cells(lZeile, 217).Value
                 txt218 = Tabelle1.Cells(lZeile, 218).Value
                 txt219 = Tabelle1.Cells(lZeile, 219).Value
                 txt220 = Tabelle1.Cells(lZeile, 220).Value
                 txt221 = Tabelle1.Cells(lZeile, 221).Value
                
            
                 Exit Do
            
             End If
        
             lZeile = lZeile + 1
        
         Loop
        
     End If
    
End Sub
Private Sub txt101_Change()
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "ja" And txt91.Text = "ja" And  _
txt96.Text = "ja" And txt101.Text = "ja" And txt12.Text = 6 Then
txt15.Text = "Fertig"
End If
End Sub

Private Sub txt102_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt102.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt102.Value)))
      If Left(Me.txt102.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt102.Value = sDatum
       Else
         With txt102
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt102.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt102
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt11__BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt11.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt11.Value)))
      If Left(Me.txt11.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt11.Value = sDatum
       Else
         With txt11
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt11.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt11
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
End Sub

Private Sub txt106_Change()
If txt17.Text = 3 And txt106.Text = "ja" And txt111.Text = "" And txt116.Text = "" Then
txt20.Text = "Offen DV2,DV3"
Else
If txt106.Text = "ja" And txt111.Text = "" And txt116.Text = "" And txt121.Text = "" And txt126. _
Text = "" And txt131.Text = "" And txt17.Text = 6 Then
txt20.Text = "Offen DV2 - DV6"
Else
txt20.Text = ""
End If
End If
End Sub

Private Sub txt111_Change()
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "" And txt17.Text = 3 Then
txt20.Text = "Offen DV3"
Else
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "" And txt121.Text = "" And  _
txt126.Text = "" And txt131.Text = "" And txt17.Text = 6 Then
txt20.Text = "Offen DV3 - DV6"
Else
txt106_Change
End If
End If
End Sub

Private Sub txt116_Change()
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "ja" And txt17.Text = 3 Then
txt20.Text = "Fertig"
Else
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "ja" And txt121.Text = "" And  _
txt126.Text = "" And txt131.Text = "" And txt17.Text = 6 Then
txt20.Text = "Offen DV4 - DV6"
Else
txt111_Change
End If
End If
End Sub

Private Sub txt121_Change()
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "ja" And txt121.Text = "ja" And  _
txt126.Text = "" And txt131.Text = "" And txt17.Text = 6 Then
txt20.Text = "Offen DV5,DV6"
End If
End Sub

Private Sub txt126_Change()
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "ja" And txt121.Text = "ja" And  _
txt126.Text = "ja" And txt131.Text = "" And txt17.Text = 6 Then
txt20.Text = "Offen DV6"
End If
End Sub

Private Sub txt131_Change()
If txt106.Text = "ja" And txt111.Text = "ja" And txt116.Text = "ja" And txt121.Text = "ja" And  _
txt126.Text = "ja" And txt131.Text = "ja" And txt17.Text = 6 Then
txt20.Text = "Fertig"
End If
End Sub

Private Sub txt132_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt132.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt132.Value)))
      If Left(Me.txt132.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt132.Value = sDatum
       Else
         With txt132
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt132.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt132
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt16__BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt16.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt16.Value)))
      If Left(Me.txt16.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt16.Value = sDatum
       Else
         With txt16
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt16.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt16
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
End Sub

Private Sub txt136_Change()
If txt22.Text = 3 And txt136.Text = "ja" And txt141.Text = "" And txt146.Text = "" Then
txt25.Text = "Offen DV2,DV3"
Else
If txt136.Text = "ja" And txt141.Text = "" And txt146.Text = "" And txt151.Text = "" And txt156. _
Text = "" And txt161.Text = "" And txt22.Text = 6 Then
txt25.Text = "Offen DV2 - DV6"
Else
txt25.Text = ""
End If
End If
End Sub

Private Sub txt141_Change()
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "" And txt22.Text = 3 Then
txt25.Text = "Offen DV3"
Else
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "" And txt151.Text = "" And  _
txt156.Text = "" And txt161.Text = "" And txt22.Text = 6 Then
txt25.Text = "Offen DV3 - DV6"
Else
txt136_Change
End If
End If
End Sub

Private Sub txt146_Change()
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "ja" And txt22.Text = 3 Then
txt25.Text = "Fertig"
Else
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "ja" And txt151.Text = "" And  _
txt156.Text = "" And txt161.Text = "" And txt22.Text = 6 Then
txt25.Text = "Offen DV4 - DV6"
Else
txt141_Change
End If
End If
End Sub

Private Sub txt151_Change()
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "ja" And txt151.Text = "ja" And  _
txt156.Text = "" And txt161.Text = "" And txt22.Text = 6 Then
txt25.Text = "Offen DV5,DV6"
End If
End Sub

Private Sub txt156_Change()
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "ja" And txt151.Text = "ja" And  _
txt156.Text = "ja" And txt161.Text = "" And txt22.Text = 6 Then
txt25.Text = "Offen DV6"
End If
End Sub

Private Sub txt161_Change()
If txt136.Text = "ja" And txt141.Text = "ja" And txt146.Text = "ja" And txt151.Text = "ja" And  _
txt156.Text = "ja" And txt161.Text = "ja" And txt22.Text = 6 Then
txt25.Text = "Fertig"
End If
End Sub

Private Sub txt162_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt162.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt162.Value)))
      If Left(Me.txt162.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt162.Value = sDatum
       Else
         With txt162
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt162.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt162
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt192_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt192.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt192.Value)))
      If Left(Me.txt192.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt192.Value = sDatum
       Else
         With txt192
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt192.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt192
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt21__BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt21.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt21.Value)))
      If Left(Me.txt21.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt21.Value = sDatum
       Else
         With txt21
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt21.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt21
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
End Sub

Private Sub txt26__BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt26.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt26.Value)))
      If Left(Me.txt26.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt26.Value = sDatum
       Else
         With txt26
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt26.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt26
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
End Sub

Private Sub txt3_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt3.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt3.Value)))
      If Left(Me.txt3.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) > 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt3.Value = sDatum
       Else
         With txt3
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt3.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben, Eingabe entweder 010215 oder 01.02.15 oder 01. _
02.2015!"
      With txt3
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt31__BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt31.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt31.Value)))
      If Left(Me.txt31.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt31.Value = sDatum
       Else
         With txt31
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt31.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt31
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
End Sub

Private Sub txt42_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt42.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt42.Value)))
      If Left(Me.txt42.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt42.Value = sDatum
       Else
         With txt42
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt42.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt42
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub
Private Sub txt46_Change()
If txt46.Text = "ja" And txt51.Text = "" And txt56.Text = "" And txt7.Text = 3 Then
txt10.Text = "Offen DV2,DV3"
Else
If txt46.Text = "ja" And txt51.Text = "" And txt56.Text = "" And txt61.Text = "" And txt66.Text  _
= "" And txt71.Text = "" And txt7.Text = 6 Then
txt10.Text = "Offen DV2 - DV6"
Else
txt10.Text = ""
End If
End If
End Sub

Private Sub txt51_Change()
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "" And txt7.Text = 3 Then
txt10.Text = "Offen DV3"
Else
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "" And txt61.Text = "" And txt66. _
Text = "" And txt71.Text = "" And txt7.Text = 6 Then
txt10.Text = "Offen DV3 - DV6"
End If
End If
End Sub

Private Sub txt56_Change()
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "ja" And txt7.Text = 3 Then
txt10.Text = "Fertig"
Else
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "ja" And txt61.Text = "" And txt66. _
Text = "" And txt71.Text = "" And txt7.Text = 6 Then
txt10.Text = "Offen DV4 - DV6"
End If
End If
End Sub

Private Sub txt6_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt6.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt6.Value)))
      If Left(Me.txt6.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt6.Value = sDatum
       Else
         With txt6
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt6.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt6
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt61_Change()
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "ja" And txt61.Text = "ja" And  _
txt66.Text = "" And txt71.Text = "" And txt7.Text = 6 Then
txt10.Text = "Offen DV5,DV6"
Else
End If
End Sub

Private Sub txt66_Change()
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "ja" And txt61.Text = "ja" And  _
txt66.Text = "ja" And txt71.Text = "" And txt7.Text = 6 Then
txt10.Text = "Offen DV6"
Else
txt61_Change
End If
End Sub

Private Sub txt71_Change()
If txt46.Text = "ja" And txt51.Text = "ja" And txt56.Text = "ja" And txt61.Text = "ja" And  _
txt66.Text = "ja" And txt71.Text = "ja" And txt7.Text = 6 Then
txt10.Text = "Fertig"
Else
txt66_Change
End If
End Sub

Private Sub txt72_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim sDatum    As String
Dim sEingabe  As String
Dim sJahr     As String
Dim sMonat    As String
Dim sTag      As String
   If Not Me.txt72.Value = "" Then
      Application.EnableEvents = False
      On Error GoTo Fehler
      sEingabe = CStr(CLng(Trim(Me.txt72.Value)))
      If Left(Me.txt72.Value, 1) = "0" Or _
         Len(sEingabe) = 5 Or Len(sEingabe) = 7 Then
         sEingabe = "0" & sEingabe
      End If
      
      If Len(sEingabe) = 6 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 2)
         If Val(sJahr) < 15 Then
            sJahr = "19" & sJahr
          Else
            sJahr = "20" & sJahr
         End If
      ElseIf Len(sEingabe) = 8 Then
         sTag = Left(sEingabe, 2)
         sMonat = Mid(sEingabe, 3, 2)
         sJahr = Right(sEingabe, 4)
      End If
      
      sDatum = sTag & "." & sMonat & "." & sJahr
      
      If IsDate(sDatum) Then
         Me.txt72.Value = sDatum
       Else
         With txt72
            .Value = ""
            .SetFocus
            .SelStart = 0
            .SelLength = Len(.Text)
         End With
      End If
       
      Application.EnableEvents = True
      On Error GoTo 0
   End If
   
   If Not IsDate(txt72.Text) Then
      MsgBox "Bitte ein richtiges Datum eingeben!"
      With txt72
         .Value = ""
         .SetFocus
         .SelStart = 0
         .SelLength = Len(.Text)
      End With
   End If
   Exit Sub
Fehler:
   Application.EnableEvents = True
End Sub

Private Sub txt76_Change()
If txt12.Text = 3 And txt76.Text = "ja" And txt81.Text = "" And txt86.Text = "" Then
txt15.Text = "Offen DV2,DV3"
Else
If txt76.Text = "ja" And txt81.Text = "" And txt86.Text = "" And txt91.Text = "" And txt96.Text  _
= "" And txt101.Text = "" And txt12.Text = 6 Then
txt15.Text = "Offen DV2 - DV6"
Else
txt15.Text = ""
End If
End If
End Sub

Private Sub txt81_Change()
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "" And txt12.Text = 3 Then
txt15.Text = "Offen DV3"
Else
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "" And txt91.Text = "" And txt96. _
Text = "" And txt101.Text = "" And txt12.Text = 6 Then
txt15.Text = "Offen DV3 - DV6"
End If
End If
End Sub

Private Sub txt86_Change()
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "ja" And txt12.Text = 3 Then
txt15.Text = "Fertig"
Else
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "ja" And txt91.Text = "" And txt96. _
Text = "" And txt101.Text = "" And txt12.Text = 6 Then
txt15.Text = "Offen DV4 - DV6"
End If
End If
End Sub

Private Sub txt91_Change()
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "ja" And txt91.Text = "ja" And  _
txt96.Text = "" And txt101.Text = "" And txt12.Text = 6 Then
txt15.Text = "Offen DV5,DV6"
End If
End Sub

Private Sub txt96_Change()
If txt76.Text = "ja" And txt81.Text = "ja" And txt86.Text = "ja" And txt91.Text = "ja" And  _
txt96.Text = "ja" And txt101.Text = "" And txt12.Text = 6 Then
txt15.Text = "Offen DV6"
End If
End Sub

Private Sub txtsuchen_Change()
Dim i As Integer
With ListBox1
For i = 0 To .ListCount - 1
If Not InStr(.List(i), txtsuchen.Text) = 0 Then
.Selected(i) = True
End If
Next
End With
End Sub

Private Sub UserForm_Activate()
     
     If ListBox1.ListCount > 0 Then ListBox1.ListIndex = 0
End Sub
Private Sub UserForm_initialize()
   Dim lZeile As Long
  
     
     txt1 = ""
     txt2 = ""
     txt3 = ""
     txt4 = ""
     txt5 = ""
     txt6 = ""
     txt7 = ""
     txt8 = ""
     txt9 = ""
     txt10 = ""
     txt11 = ""
     txt12 = ""
     txt13 = ""
     txt14 = ""
     txt15 = ""
     txt16 = ""
     txt17 = ""
     txt18 = ""
     txt19 = ""
     txt20 = ""
     txt21 = ""
     txt22 = ""
     txt23 = ""
     txt24 = ""
     txt25 = ""
     txt26 = ""
     txt27 = ""
     txt28 = ""
     txt29 = ""
     txt30 = ""
     txt31 = ""
     txt32 = ""
     txt33 = ""
     txt34 = ""
     txt35 = ""
     txt36 = ""
     txt37 = ""
     txt38 = ""
     txt39 = ""
     txt40 = ""
     txt41 = ""
     txt42 = ""
     txt43 = ""
     txt44 = ""
     txt45 = ""
     txt46 = ""
     txt47 = ""
     txt48 = ""
     txt49 = ""
     txt50 = ""
     txt51 = ""
     txt52 = ""
     txt53 = ""
     txt54 = ""
     txt55 = ""
     txt56 = ""
     txt57 = ""
     txt58 = ""
     txt59 = ""
     txt60 = ""
     txt61 = ""
     txt62 = ""
     txt63 = ""
     txt64 = ""
     txt65 = ""
     txt66 = ""
     txt67 = ""
     txt68 = ""
     txt69 = ""
     txt70 = ""
     txt71 = ""
     txt72 = ""
     txt73 = ""
     txt74 = ""
     txt75 = ""
     txt76 = ""
     txt77 = ""
     txt78 = ""
     txt79 = ""
     txt80 = ""
     txt81 = ""
     txt82 = ""
     txt83 = ""
     txt84 = ""
     txt85 = ""
     txt86 = ""
     txt87 = ""
     txt88 = ""
     txt89 = ""
     txt90 = ""
     txt91 = ""
     txt92 = ""
     txt93 = ""
     txt94 = ""
     txt95 = ""
     txt96 = ""
     txt97 = ""
     txt98 = ""
     txt99 = ""
     txt100 = ""
     txt101 = ""
     txt102 = ""
     txt103 = ""
     txt104 = ""
     txt105 = ""
     txt106 = ""
     txt107 = ""
     txt108 = ""
     txt109 = ""
     txt111 = ""
     txt112 = ""
     txt113 = ""
     txt113 = ""
     txt114 = ""
     txt115 = ""
     txt116 = ""
     txt117 = ""
     txt118 = ""
     txt119 = ""
     txt120 = ""
     txt121 = ""
     txt122 = ""
     txt123 = ""
     txt124 = ""
     txt125 = ""
     txt126 = ""
     txt127 = ""
     txt128 = ""
     txt129 = ""
     txt130 = ""
     txt131 = ""
     txt132 = ""
     txt133 = ""
     txt134 = ""
     txt135 = ""
     txt136 = ""
     txt137 = ""
     txt138 = ""
     txt139 = ""
     txt140 = ""
     txt141 = ""
     txt142 = ""
     txt143 = ""
     txt144 = ""
     txt145 = ""
     txt146 = ""
     txt147 = ""
     txt148 = ""
     txt149 = ""
     txt150 = ""
     txt151 = ""
     txt152 = ""
     txt153 = ""
     txt154 = ""
     txt155 = ""
     txt156 = ""
     txt157 = ""
     txt158 = ""
     txt159 = ""
     txt160 = ""
     txt161 = ""
     txt162 = ""
     txt163 = ""
     txt164 = ""
     txt165 = ""
     txt166 = ""
     txt167 = ""
     txt168 = ""
     txt169 = ""
     txt170 = ""
     txt171 = ""
     txt172 = ""
     txt173 = ""
     txt174 = ""
     txt175 = ""
     txt176 = ""
     txt177 = ""
     txt178 = ""
     txt179 = ""
     txt180 = ""
     txt181 = ""
     txt182 = ""
     txt183 = ""
     txt184 = ""
     txt185 = ""
     txt186 = ""
     txt187 = ""
     txt188 = ""
     txt189 = ""
     txt190 = ""
     txt191 = ""
     txt192 = ""
     txt193 = ""
     txt194 = ""
     txt195 = ""
     txt196 = ""
     txt197 = ""
     txt198 = ""
     txt199 = ""
     txt200 = ""
     txt201 = ""
     txt202 = ""
     txt203 = ""
     txt204 = ""
     txt205 = ""
     txt206 = ""
     txt207 = ""
     txt208 = ""
     txt209 = ""
     txt211 = ""
     txt212 = ""
     txt213 = ""
     txt213 = ""
     txt214 = ""
     txt215 = ""
     txt216 = ""
     txt217 = ""
     txt218 = ""
     txt219 = ""
     txt220 = ""
     txt221 = ""
     
     ListBox1.Clear
    
     lZeile = 2
     
     Do While Trim(CStr(Tabelle1.Cells(lZeile, 1).Value)) <> ""
        
         
         ListBox1.AddItem Trim(CStr(Tabelle1.Cells(lZeile, 1).Value))
        
         lZeile = lZeile + 1
        
     Loop
    
End Sub


Bild

Betrifft: AW: Aufruf einer Userform führt zum Absturz von Excel
von: Robin Lange
Geschrieben am: 06.10.2015 16:50:27
Hallo, da hast du natürlich vollkommen recht, ich wollte nur die Datei nicht hochladen wegen den sensitiven Einträgen darin. Aber hier einiges an Code.

 Bild

Beiträge aus den Excel-Beispielen zum Thema "Aufruf einer Userform führt zum Absturz von Excel"