_Application.AddCustomList Method
Adds a custom list for custom autofill and/or custom sort.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub AddCustomList ( _
ListArray As Object, _
ByRow As Object _
)
'Usage
Dim instance As _Application
Dim ListArray As Object
Dim ByRow As Object
instance.AddCustomList(ListArray, ByRow)
void AddCustomList(
Object ListArray,
Object ByRow
)
Parameters
ListArray
Type: System.ObjectRequired Object. Specifies the source data, as either an array of strings or a Range object.
ByRow
Type: System.ObjectOptional Object. Only used if ListArray is a Range object. True to create a custom list from each row in the range. False to create a custom list from each column 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. If this argument is omitted and there are more columns than rows in the range, Microsoft Excel creates a custom list from each row in the range.
Remarks
If the list you're trying to add already exists, this method does nothing.