Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FillAcrossSheets Unspecified Range

Status
Not open for further replies.

Eytch

Programmer
Jan 29, 2003
60
US
I want to copy a selected range of cells to other sheets using the FillAcrossSheets method. What I have tried below in my macro does not work. I know the FillAcrossSheets method has a defined range in the help example, .Range("A5,B9") as the suffix. How do I get it to work when I want the selected range to be copied to additional sheets in an array. What follows gives an error message.

ActiveCell.CurrentRegion.Select
x = Array("Sheet2")
Sheets(x).FillAcrossSheets _
Worksheets("Sheet1").Selection

Thank You,
Lakefish
 
Lakefish,

This following works. You only need to adjust for the specific worksheets.

ActiveCell.CurrentRegion.Select
rng = Selection.Address
x = Array("Sheet1", "Sheet2", "Sheet3")
Sheets(x).FillAcrossSheets _
Worksheets("Sheet1").Range(rng)

Regards, Dale Watson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top