Hallo Markus,
ich habe zwar mit dem Recorder aufgezeichnet, aber feste Bezüge eingeragen. Wenn ich eine Mappe solo damit laufen lasse, dann ist die Gültigkeit immer vorhanden. Lasse ich es in meiner Anwendung (VBA mit eigenem Menü etc. ) laufen, ist es so, dass mal die Gültigkeit funktioniert, mal nicht. Habe das script gür die Gültigkeit an die letzte Position gesetzt (lasse alle auf das/die Register einwirkenden Makros vorher durchlaufen), lediglich das autom. Springen zum aktuellen Datum (durch alle Monatsregister 01...12 in der Mappe) kommt dann noch. Auch habe ich es mit Union und Range(Bereiche nacheinander hier) versucht - das kláppte noch weniger. Deshalb diese Bombenlegerformel. Damit funktioniert es wenigstens 1 von 10 mal so. DieMappe ist zu groß (1,5 MB)mit Menüs etc., sonst hätte ich sie hochgeladen. Das script der Gültigkeit folgt unten. Vielleicht fällt dir etwas ein, denn die Gültigkeit benötige ich, weil Leute, die gerade den PC einschalten können, simple Eingaben machen sollen (nur "x" und Zahlen in best. Spalten.
Danke erst einmal! Gruß Horst
Sub Station_Gültigkeiten()
ActiveSheet.Unprotect "2005"
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = False
Range("O3:BX502").Select
Range("O3").Activate
Selection.Locked = False
Selection.FormulaHidden = False
Range("O3:O502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("P3:P502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("Q3:Q502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("R3:R502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("S3:S502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("T3:T502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("U3:U502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("V3:V502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("W3:W502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("X3:X502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("Y3:Y502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("Z3:Z502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AA3:AA502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AB3:AB502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AC3:AC502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AD3:AD502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AE3:AE502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AF3:AF502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AG3:AG502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AH3:AH502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AI3:AI502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AJ3:AJ502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AK3:AK502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AL3:AL502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AM3:AM502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AN3:AN502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AO3:AO502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AP3:AP502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AQ3:AQ502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AR3:AR502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AS3:AS502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AT3:AT502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AU3:AU502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AV3:AV502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AW3:AW502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AX3:AX502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AY3:AY502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("AZ3:AZ502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BA3:BA502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BB3:BB502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BC3:BC502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BD3:BD502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BE3:BE502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BF3:BF502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BG3:BG502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BH3:BH502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BI3:BI502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BJ3:BJ502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BK3:BK502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BL3:BL502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BM3:BM502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BN3:BN502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BO3:BO502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BP3:BP502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BQ3:BQ502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BR3:BR502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BS3:BS502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BT3:BT502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BU3:BU502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BV3:BV502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BW3:BW502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="x"
.IgnoreBlank = False
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "Bitte nur ein kleines x eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("BX3:BX502").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlGreaterEqual, Formula1:="1"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Achtung!"
.InputMessage = ""
.ErrorMessage = "Bitte nur ganze Zahlen eingeben!"
.ShowInput = False
.ShowError = True
End With
Range("D3").Select
ActiveWindow.FreezePanes = True
ActiveWorkbook.Save
ActiveSheet.Protect "2005"
End Sub