Gültigkeitsprüfung mit RowsCount
01.08.2017 17:07:02
TiloT
ich möchte per VBA einen Dropdown einer Liste in Zelle F14 erstellen.
Formula1:="=LISTE!$A$1:$A$3500" alles iO
Ich brauche aber sowas wie
Formula1:="=LISTE!$A$1:$A$ & loletzte"
Wie geht das?
Danke mal für Eure Hilfe
Gruß
Tilo
Dim loletzte
loletzte = Worksheets("LISTE").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Table").Select
Range("F14").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertInformation, _
Operator:=xlBetween, Formula1:="=LISTE!$A$1:$A$ & loletzte"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = _
"Für diese bla"
.ShowInput = False
.ShowError = True
End With