Oh stimmt, sorry.
Option Explicit
Public Sub OK_click()
Dim TextBox1 As Double
Dim TextBox2 As Double
Dim TextBox3 As Double
Dim TextBox4 As Double
Dim Chkbx_BF As Boolean
Dim Chkbx_WF As Boolean
Dim Chkbx_WG As Boolean
Dim Chkbx_JET As Boolean
Dim i As Integer
i = 0
' Zum Zählen der nächsten freien Spalte
Do While Worksheets("Archiv").Cells(4 + i, 2).Value <> Empty
i = i + 1
Loop
' Nummerierung
Worksheets("Archiv").Cells(4 + i, 1) = i + 1
' Beschriftung durch die Textboxen
Worksheets("Archiv").Cells(4 + i, 2).Value = Person_anlegen.TextBox1.Value
Worksheets("Archiv").Cells(4 + i, 3).Value = Person_anlegen.TextBox2.Value
Worksheets("Archiv").Cells(4 + i, 4).Value = Person_anlegen.TextBox3.Value
Worksheets("Archiv").Cells(4 + i, 5).Value = Person_anlegen.TextBox4.Value
' Beschriftung durchs ankreuzen
If Chkbx_BF = False And Chkbx_WF = False And Chkbx_WG = False And Chkbx_JET = False Then
MsgBox "Qualifikation ankreuzen!", vbOKOnly + vbInformation, "Warnung"
End If
If Chkbx_BF = True Then
Worksheets("Archiv").Cells(4 + i, 6) = "x"
End If
If Chkbx_WF = True Then
Worksheets("Archiv").Cells(4 + i, 7) = "x"
End If
If Chkbx_WG = True Then
Worksheets("Archiv").Cells(4 + i, 8) = "x"
End If
If Chkbx_JET = True Then
Worksheets("Archiv").Cells(4 + i, 9) = "x"
End If
Unload Person_anlegen
End Sub
Public Sub Ende_Click()
Unload Person_anlegen
End Sub
Hier habe ich es jetzt mit If-Endif versucht...
Chkbx sind die Checkboxen,
|