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: 1
Default Copy two sheets


Hello.

I have the following sub doing exactly what I need but have just had a
request to pull two sheets from the same workbook and save them both in
the same newly created workbook.

'copy sheet into new workbook
Sheets("??????????").Copy

'copy the funky colours from the global report workbook
ActiveWorkbook.Colors = Workbooks(currentReportFile).Colors

'make the lookup section into values
Range("AM2:AX185").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Range("A1").Select

'rename sheet
Sheets("???????????").Name = "????????????? " & Format(Date,
"yyyymmdd")


'break links
ActiveWorkbook.BreakLink Name:= _
"G:\????????.xls", Type:=xlExcelLinks

'save in archive folder
ReportFilename = _
"G:\?????????? " & _
Format(Date, "yyyymmdd") & ".xls"
ActiveWorkbook.SaveAs Filename:=ReportFilename

'close file
ActiveWorkbook.Close

End Sub


I am stumped as to how to copy both sheets across at tha same time and
put them in the same workbook.

All help greatly appreciated.

Kristan


--
Kstalker
------------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...o&userid=24699
View this thread: http://www.excelforum.com/showthread...hreadid=466141

 
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
copy cell info to other sheets, other sheets dont contain all row. Ja Excel Worksheet Functions 1 November 1st 09 12:53 AM
move or copy sheets doesn't copy format ColinX Excel Worksheet Functions 1 May 14th 08 10:07 PM
Copy Sheets griify Excel Discussion (Misc queries) 2 December 9th 05 11:21 PM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM
copy sheets JMG[_2_] Excel Programming 7 May 7th 05 08:42 PM


All times are GMT +1. The time now is 04:02 PM.

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

About Us

"It's about Microsoft Excel"