Ich habe eine UF,dort möchte gerne wenn die TextBox2 =""
daß dann die MsgBox erscheint,und der Code abgebrochen wird.
Könnte mir dazu bitte jemand helfen ?
Gruß
Heinz
Sub LOT()
Sheets("Sortierrapport").Unprotect
Dim LoLetzte As Long
Dim Lox, LOT As Long
'If TextBox2.Value = "" Then MsgBox "Leer"
LoLetzte = Cells(Rows.Count, 4).End(xlUp).Row
Application.ScreenUpdating = False
For Lox = 1 To Cells(2, "O")
Cells(LoLetzte + 1, 4) = Lox
Cells(LoLetzte + 1, 3) = Cells(2, "P")
LoLetzte = Cells(Rows.Count, 4).End(xlUp).Row
Next
Sheets("Sortierrapport").Protect
Cells(2, "P") = Cells(2, "P") ' + 1
ActiveSheet.Shapes("Neu").Visible = True
End Sub