Range.AutoFill Method
Performs an autofill on the cells in the specified range.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function AutoFill ( _
Destination As Range, _
Type As XlAutoFillType _
) As Object
'Usage
Dim instance As Range
Dim Destination As Range
Dim Type As XlAutoFillType
Dim returnValue As Object
returnValue = instance.AutoFill(Destination, _
Type)
Object AutoFill(
Range Destination,
XlAutoFillType Type
)
Parameters
Destination
Type: Microsoft.Office.Interop.Excel.RangeRequired Range object. The cells to be filled. The destination must include the source range.
Type
Type: Microsoft.Office.Interop.Excel.XlAutoFillTypeOptional XlAutoFillType. Specifies the fill type. Can be one of these XlAutoFillType constants:
xlFillDays
xlFillFormats
xlFillSeries
xlFillWeekdays
xlGrowthTrend
xlFillCopy
xlFillDefaultdefault
xlFillMonths
xlFillValues
xlFillYears
xlLinearTrend
If this argument is xlFillDefault or omitted, Microsoft Excel selects the most appropriate fill type, based on the source range.
Return Value
Type: System.Object