ich habe leider ein Problem mit VBA. Über einen CommandButton rufe ein Modul auf, das funktioniert auch, nur werden die Befehle nach einem bestimmten Punkt ignoriert (Sheets("Test2").Select). Ich habe auch schon einen Stoppunkt gesetzt, aber auch der wird ignoriert. Ich will eigentlich nur, dass nach dem Abarbeiten des Makros wieder zu "Test2" gesprungen wird. Was mache ich falsch? Ich habe hier mal meinen Code gepostet und hoffe auf baldige Anwort. Vielen Dank im vorraus.
Detleff
Sub insert_row()
Sheets("Test1").Select
Rows("4").Select
Selection.Insert Shift:=xlDown
Cells(4, 1).Select
Range("G4").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$N$1:$P$1"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Rows("4:4").Select
Selection.RowHeight = 30.75
Range("J4:M4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sheets("Test2").Select
End Sub