View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JABAgdl JABAgdl is offline
external usenet poster
 
Posts: 4
Default Copy a table from one workbook to ALL worksheets in a different wb

Hello Excel Gurus!

I need to copy a summary table that is in workbook "A" to all worksheets
contained in workbbok "B". Sometimes workbook "B" have 800+ worksheets. So I
tried to make a macro that would that for me as follows:

Windows("A.xlsm").Activate
Range("A1:B17").Select
Selection.Copy
Windows("B.xls").Activate

Dim Wks As Worksheet

For Each Wks In ActiveWorkbook.Worksheets

With Wks
Range("B31").Select
ActiveSheet.Paste
End With
Next Wks
Windows("A.xlsm").Activate
Range("D1").Select

However it is not working properly since it is not changing to the next
worksheet in the workbook. Can you help me with it please? By the way,
worksheet's number are not consecutive numbers, even some of them have been
renamed to a word like "Store1".

Thanks you in advance for any and all help!

JB