Folgenden Code nutze ich damit mir Prüftermine gemeldet werden. Jetzt möchte ich zusätzlich die Zeilennummer angezeigt bekommen damit man das Produkt schneller findet. Leider sind meine Kenntnisse nicht ausreichend um dies zu realisieren. Hab da schon einiges probiert, bekomme ich aber einfach nicht hin.
Schon mal ein Danke für Eure Hilfe
Gruß, Guesa
Sub Meldungen()
If ActiveSheet.ProtectContents = True Then Exit Sub
If Cells(2, 27) > 0 Then
Dim x
For x = 4 To 1300
txtzeile = Zeile 'hier dann die Zeilennummer
txtMedpro = Cells(x, 7)
txtStandort = Cells(x, 1) & " " & Cells(x, 2)
txtInvNr = Cells(x, 5)
txtTage = Cells(x, 28) & " " & Cells(x, 29) & " " & Cells(x, 30)
txtGeb = Cells(x, 12)
If Cells(x, 26) = 1 Then
UserForm2.Label1.Caption = "Sicherheits-Technische-Kontrolle! " & txtTage & ""
UserForm2.Label2.Caption = "Sollte das Medizinische Produkt: " + txtMedpro
UserForm2.Label3.Caption = " Im Standort: " & txtStandort & ""
UserForm2.Label4.Caption = "Mit der Inventar Nr.: " & txtInvNr & " (Steht in Zeile: " & txtzeile & ")" 'Dann Zeilen Nr verknüpft mit Text und der Inventar Nr
UserForm2.Label5.Caption = "Am: " & txtGeb & ""
UserForm2.Show
End If
Next
End If
If Cells(2, 27) = 0 Then
UserForm3.Show
End If
If Cells(2, 32) > 0 Then
Dim Y
For Y = 4 To 1300
txtzeile = Zeile 'hier auch die Zeilennummer
txtMedpro1 = Cells(Y, 7)
txtStandort1 = Cells(Y, 1) & " " & Cells(Y, 2)
txtInvNr1 = Cells(Y, 5)
txtTage1 = Cells(Y, 34) & " " & Cells(Y, 33) & " " & Cells(Y, 35)
txtGeb1 = Cells(Y, 16)
If Cells(Y, 32) = 1 Then
UserForm3.Label1.Caption = "Mess-Technische-Kontrolle! " & txtTage1 & ""
UserForm3.Label2.Caption = "Sollte das Medizinische Produkt: " + txtMedpro1
UserForm3.Label3.Caption = " Im Standort: " & txtStandort1 & ""
UserForm3.Label4.Caption = "Mit der Inventar Nr.: " & txtInvNr1 & " (Steht in Zeile: " & txtzeile & ")" 'Dann Zeilen Nr verknüpft mit Text und der Inventar Nr
UserForm3.Label5.Caption = "Am: " & txtGeb1 & ""
UserForm2.Show
End If
Next
End If
If Cells(2, 32) = 0 Then
UserForm3.Show
End If
End Sub