![]() On Error Goto 0 ' resume regular error handling On Error Resume Next ' if the list already exists, don'thingĪpplication.AddCustomList Array("cogs", "sprockets", _ This example adds an array of strings as a custom list. ![]() Catch the error with an On Error statement. If the list that you are trying to add already exists, this method throws a run-time error 1004. If this argument is omitted and there are more columns than rows in the range, Excel creates a custom list from each row in the range. If this argument is omitted and there are more rows than columns (or an equal number of rows and columns) in the range, Microsoft Excel creates a custom list from each column in the range. ![]() False to create a custom list from each column in the range. True to create a custom list from each row in the range. Only used if ListArray is a Range object. Specifies the source data, as either an array of strings or a Range object. AddCustomList ( ListArray, ByRow)Įxpression A variable that represents an Application object. Adds a custom list for custom autofill and/or custom sort.
0 Comments
Leave a Reply. |