LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Copy sheets from source wkbk to another wkbk

Thank you Joel
--
Deirdre


"Joel" wrote:

No. You have to add a new copy line for each sheet.

ThisWorkbook.Sheets("Analysis").Copy _
after:=.Sheets(Sheets.Count)
ThisWorkbook.Sheets("Analysis 1").Copy _
after:=.Sheets(Sheets.Count)
ThisWorkbook.Sheets("Analysis 2").Copy _
after:=.Sheets(Sheets.Count)


"Diddy" wrote:

Hi Joel,

That's lovely :-)

Can I just add additional Analysis sheet names to that line?

This will help more than you could ever know - so thank you!
--
Deirdre


"Joel" wrote:

this cod ewill copy the Analysis sheett to all workbook in a folder. Make
sure tthe sheet name Analysis is correct, and change Folder as required.

Sub copysheet()
Folder = "C:\temp\"
FName = Dir(Folder & "*.xls")
Do While FName < ""
Set OldBk = Workbooks.Open(Filename:=Folder & FName)
With OldBk
ThisWorkbook.Sheets("Analysis").Copy _
after:=.Sheets(Sheets.Count)
End With
OldBk.Close savechanges:=True
FName = Dir()
Loop
End Sub

"Diddy" wrote:

Hi everyone,

Could anyone help me to do this please.

I have a source workbook which is basically dumy data and completed analysis
sheets.

I then have multiple data workbooks (names are all different - i.e. don't
follow a pattern).

What I would like to be able to do is to copy the analysis sheets to each of
the data workbooks.

I have tried to record macros but I'm getting all tied up identifying which
sheet is activated.

Please help, I know it's going to look a lot easier when someone who knows
what they are doing has a go!

Thank you
--
Deirdre

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find WkBk Path, Then use this path to open another WkBk in Subfold dim Excel Programming 10 April 23rd 08 01:00 AM
Creating a Hyperlink from 1 WKBK to open another WKBK and activate Barb Reinhardt Excel Programming 10 May 31st 07 06:45 PM
Copy paste WkBk/sheet 1 to multiple wkbks/sheets wrpalmer Excel Programming 1 August 20th 05 03:08 PM
run a procedure in 1 wkbk from another wkbk carenla Excel Programming 1 July 7th 05 05:40 PM
looking for way to name columns (across sheets in wkbk) mr unreliable New Users to Excel 3 February 10th 05 09:32 PM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"