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: 59
Default Copy two sheets from workbook & create new workbook

Hello,
I would like to copy two worksheets (formatting and all...) from one
workbook and create a new workbook with just those two sheets. Here is the
code I used to copy one worksheet, but I can not figure out how to do two. I
am not opposed to all new coding:

' save worksheet with this file name
FilePathName = Sheets("Data").Range("I23") & "\" &
Sheets("Data").Range("I19") & "\" & Sheets("Data").Range("I21") & "\" & Date$
& ".xls"
newsht = ActiveSheet.Copy
Set Wkb = ActiveWorkbook
Wkb.Sheets("Current Openings").Name = "Current Openings"
With ActiveWorkbook
.SaveAs Filename:=FilePathName
.Close False
End With

Thank you in advance for your help!
 
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 all worksheets to another workbook, excl. duplicate sheets already in other workbook ARbitOUR[_15_] Excel Programming 2 May 27th 09 06:14 AM
Create New Workbook and copy sheets from my Speadsheet Jeffrey[_2_] Excel Programming 4 April 24th 09 03:42 AM
Create new workbook, temporarily name it and copy sheets to it DerbyJim Excel Programming 4 January 12th 06 05:03 PM
copy sheets in workbook to new workbook Ctech[_56_] Excel Programming 1 November 23rd 05 08:09 PM
create workbook, copy sheets Pierre via OfficeKB.com[_2_] Excel Programming 0 October 25th 05 07:51 AM


All times are GMT +1. The time now is 09:50 AM.

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"