FillAcrossSheets Method

Applies To

Sheets Collection, Worksheets Collection.

Description

Copies a range to the same area on all other worksheets in a collection.

Syntax

object.FillAcrossSheets(range, type)

object

Required. The Sheets or Worksheets object.

range

Required. Specifies the range to fill across the worksheets in the collection. The range must be from a worksheet within the collection.

type

Optional. Specifies how to copy the range (one of xlAll, xlContents, or xlFormulas). The default is xlAll if this argument is omitted.

Example

This example fills the range A1:C5 on Sheet1, Sheet5, and Sheet7 with the contents of the same range on Sheet1.


x = Array("Sheet1", "Sheet5", "Sheet7")
Sheets(x).FillAcrossSheets _
    Worksheets("Sheet1").Range("A1:C5")