Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy worksheet, trying to paste to new workbook error assistance.
I have a workbook that calls the following sub to copy the calculated sheet
and renames it based on the range within the cell. The core code seems to work but every so often it hiccups and tries to copy the 'summary' sheet to a new book rather than remain in the source file 'Buzz.xls' Attached my code. Is theer any way of telling it that it must copy into the buzz workbook? Sub Copy_TeamFile() Sheets("Summary").Select 'copy sheet Sheets("Summary").Select Sheets("Summary").Copy After:=Worksheets(Worksheets.Count) Sheets("Summary (2)").Select 'Refresh data Call Calc_Update 'paste values Cells.Select Range("A7").Activate Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False 'Rename sheet to team name ActiveSheet.Name = Range("B2").Value 'Repeat for every team if neccesary Sheets("Control").Select Range("A1").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy and paste whole worksheet from one workbook to another | Excel Programming | |||
Copy/Paste Worksheet to End of Workbook | Excel Programming | |||
Copy paste to another Workbook, Error 1004 | Excel Programming | |||
copy data from one worksheet and paste into another workbook | Excel Programming | |||
Copy and paste the worksheet to New workbook.. | Excel Programming |