+ Reply to Thread
Results 1 to 5 of 5

Exporting a worksheet

  1. #1
    Registered User
    Join Date
    09-05-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Exporting a worksheet

    Hi there,

    I am after some code to achieve the following. Can anyone be kind enough to help out:

    1. Open dialogue box
    2. Set save path and filename
    3. Move pre-defined worksheet to new file ' these will be set by worksheet name within the code (worksheet name is already hard-coded within earlier code so is not at risk of changing)
    4. Save file as filename and to path defined in step 2
    5. Close saved file
    6. Delete pre-defined worksheet
    7. Confirm export to user



    Thanks,

    Rob.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Exporting a worksheet

    Change the sheet name to suit.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-05-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: Exporting a worksheet

    Thanks! That's really useful.

    Would you be able to expand a little as to how I would achieve copying two sheets from the source, both to the same destination?


    Thanks,

    Rob.

  4. #4
    Registered User
    Join Date
    09-05-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: Exporting a worksheet

    Thanks! That's really useful.

    Would you be able to expand a little as to how I would achieve copying two sheets from the source, both to the same destination?


    Thanks,

    Rob.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Exporting a worksheet

    Change this...
    With Sheets("Sheet1")

    To something like this...
    With Sheets(Array("Sheet1", "Sheet2"))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Problem exporting worksheet to pdf
    By Kenbo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-02-2015, 12:10 AM
  2. [SOLVED] Exporting selected cell valuesfrom one worksheet to another worksheet in the same workbook
    By sharabh in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-09-2012, 02:33 AM
  3. Exporting data to new worksheet (but only once)
    By say42 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2011, 11:16 AM
  4. Exporting a worksheet
    By Erebus in forum Excel General
    Replies: 0
    Last Post: 01-12-2011, 07:01 PM
  5. Exporting each table in a worksheet
    By gamaz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2009, 05:50 PM
  6. Exporting a worksheet
    By DesignerX in forum Excel General
    Replies: 3
    Last Post: 09-23-2007, 07:05 AM
  7. Exporting data from one worksheet to another
    By jbm1967 in forum Excel General
    Replies: 3
    Last Post: 11-07-2006, 11:27 AM

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