+ Reply to Thread
Results 1 to 5 of 5

Copy a sheet and save as new file, without opening the file

  1. #1
    Registered User
    Join Date
    09-09-2009
    Location
    Chatham, ON
    MS-Off Ver
    Excel 2003
    Posts
    22

    Copy a sheet and save as new file, without opening the file

    is it possible to copy one sheet in a workbook onto a new workbook then save it but not open the file?
    I know i can open, save then close all in vba, but is there a way to do it in the background?

    my current code looks like this

    Please Login or Register  to view this content.
    So i am copying my "Bid Sheet" to a new file and giving it a name. I have code below this saving the file then closing it but i am wondering if there is a way to change my above code to do it all in the background?

    Thanks in advance

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy a sheet and save as new file, without opening the file

    In VBA you can create a new, hidden instance of Excel, open the file, copy the sheet, save the file, and quit the hidden instance.

    I know of no way to copy a single sheet to a new workbook without opening the workbook.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-09-2009
    Location
    Chatham, ON
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy a sheet and save as new file, without opening the file

    How would i go about opening the hidden excel, sorry i am all self taught in this stuff and haven't come across this before.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy a sheet and save as new file, without opening the file

    Something like this:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Copy a sheet and save as new file, without opening the file

    Or, more simply,
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1