Partager via


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

  • Type
    Type: Microsoft.Office.Interop.Excel.XlAutoFillType

    Optional 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

See Also

Reference

Range Interface

Range Members

Microsoft.Office.Interop.Excel Namespace