Archive of Mr Excel Message Board

Sub Macro2()
ActiveWorkbook.Save
ActiveWorkbook.SaveAs_ FileName:="C:\excel\Book2.xls"
Workbooks.Open FileName:="C:\Excel\Book1.xls"
Workbooks("BOOK2.XLS").Close SaveChanges:=True
End Sub

Sub Macro2()
ActiveWorkbook.Save
ActiveWorkbook.SaveAs_ FileName:="C:\excel\Book2.xls"
Workbooks.Open FileName:="C:\Excel\Book1.xls"
Workbooks("BOOK2.XLS").Close SaveChanges:=True
End Sub

: Seen similar posts, but now answers. What I'm trying to do is place a command button with code that will save 1 sheet from my workbook to a new file, close that file, and return to my open workbook. Sounds similar to what Dave asked below. I think we're looking for the same solution perhaps. Dave, if I get an answer I'll send it your way. Thanks VBA'ers

As_ FileName:="C:\excel\Book2.xls"
: Seen similar posts, but now answers. What I'm trying to do is place a command button with code that will save 1 sheet from my workbook to a new file, close that file, and return to my open workbook. Sounds similar to what Dave asked below. I think we're looking for the same solution perhaps. Dave, if I get an answer I'll send it your way. Thanks VBA'ers

Sheets("NameofSheetToBeCopied").Select
Sheets("NameofSheetToBeCopied").Copy Before:=Workbooks_("NewFile").Sheets(1)
Windows("NameofSheetToBeCopied.xls").Activate
Thanks. But I'm trying to save 1 sheet only from the workbook and then allow the user to import that sheet or use data from it later in the original workbook. : : See if this helps. : Sub Macro2() : ActiveWorkbook.Save : ActiveWorkbook.SaveAs_ FileName:="C:\excel\Book2.xls" : Workbooks.Open FileName:="C:\Excel\Book1.xls" : Workbooks("BOOK2.XLS").Close SaveChanges:=True : End Sub
:
