KenCriss
Active Member
- Joined
- Jun 6, 2005
- Messages
- 326
I am creating a Validation list with VBA. For this code, it only puts the first 64 items on the list and ignores the others. Is this some type of Excel limitation I have hit? It works to reference a range on the Worksheet but I don't want to have to do that because I am creating it on the fly and don't want to have this list viewable to the user.
Columns("G:G").Select
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlEqual, Formula1:="100,101,102,110,111,150,151,152,153,154,155,159,160,161,
190,194,195,196,197,198,199,200,201,202,203,210,300,301,302,303,304,
305,306,307,308,400,401,402,403,404,405,406,407,408,409,410,411,412,
413,414,415,416,500,600,601,602,603,700,701,702,703,800,850,900,950,
1000,1001,2000,2010,2020,2030,2040,2060,2070,2080,2090,2100,2110,
3000,3010,3040,4000"
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
Code: