View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul987[_3_] Paul987[_3_] is offline
external usenet poster
 
Posts: 1
Default Copying worksheets to remainder of workbook


David - thanks for the help.

It seems to be on the right track, but I am missing something. I will
try to give more detail. I have a workbook with many sheets, the
number of which will vary. The first two worksheets ("sheet1" and
"sheet2") will remain constant. I need to copy sheet2.columns(E:O) to
all remaining sheets in columns(E:O). The code seems to select and copy
the correct data, but returns an error regarding the size and shape of
paste area being different. I am very new to this, and have been
proceeding through trial and error. Any additional help would be great.


This is where I now stand:

Sub Copyandpaste()

Dim wks As Worksheet

Sheets(2).Select
Columns("E:O").Select
Selection.Copy

For Each wks In ActiveWorkbook.Sheets

If wks.Name < "Sheet1" And wks.Name < "Sheet2" Then
Columns("E:O").Select
wks.Paste
End If

Next wks

End Sub


--
Paul987
------------------------------------------------------------------------
Paul987's Profile: http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=383977