AW: "Fortschritsanzeige" in Userform
27.07.2021 08:31:10
Daniel
Falls Jemand mal das gleiche problem hat, ich habs jetzt so gelöst:
Function AnzahlZeilen(Blatt As Worksheet, Spalte As String) As Long
AnzahlZeilen = WorksheetFunction.CountA(Blatt.Range(Spalte))
End Function
Private Sub UserForm_Initialize()
Dim objCell As Range
Dim strFirsAddress As String
Dim AnzahlGes As Integer
AnzahlLeer = AnzahlZeilen(Worksheets("Tabelle16"), "S:S")
AnzahlGes = AnzahlZeilen(Worksheets("Tabelle16"), "A:A")
AnzahlLeer = AnzahlGes - AnzahlLeer
Label17.Caption = "Arbeitsvorrat " & AnzahlLeer
'Weiter Button Nächste Relevante
Private Sub CommandButton1_Click()
Dim lngRow As Long
AnzahlLeer = AnzahlLeer - 1
Label17.Caption = "Arbeitsvorrat " & AnzahlLeer
With Worksheets("Tabelle16")
.Cells(mlngrow, 19).Value = Now
.Cells(mlngrow, 20).Value = Bearbeiter.Box1
For lngRow = mlngrow + 1 To .Rows.Count
If IsEmpty(.Cells(lngRow, 19).Value) Then
TextBox1.Text = .Cells(lngRow, 1).Value
TextBox2.Text = .Cells(lngRow, 2).Value
TextBox3.Text = .Cells(lngRow, 20).Value
TextBox15.Text = .Cells(lngRow, 7).Value
TextBox14.Text = .Cells(lngRow, 21).Value
mlngrow = lngRow
Call mobjCollection.Add(Item:=mlngrow)
Exit For
End If
Next
End With
End Sub
LG Daniel