+ Reply to Thread
Results 1 to 4 of 4

Export Worksheets from Source Workbook into a new Workbook

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Export Worksheets from Source Workbook into a new Workbook

    Hi everyone,

    I was wondering if someone can please help me with a VBA code to export worksheets from source workbook to a new workbook. Please see below specific points for what I have and what I need, apologies in advance if I this is not very clear.

    What I have;
    A source workbook with 6 worksheets named A, B, C, D, E and F
    There are extrernal links within the source workbook

    What I need;
    Export only visible cells from worksheet B, C and D into a new workbook
    Retain the data into its seperate worksheets in the new workbook
    Delete any external links in the new workbook
    Copy & Paste Special Value data
    All the formats should stay as it is apart from any 'Fill Colour' which need to be 'No Fill'

    Thanks for your help

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

    Re: Export Worksheets from Source Workbook into a new Workbook

    "Export only visible cells from worksheet B, C and D into a new workbook"

    Are there hidden or filtered data on the sheets (B,C,D) and you only want to copy only the visible (unhidden) data?

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Export Worksheets from Source Workbook into a new Workbook

    Hi & Thanks for your reply.

    Yes, thats right worksheets (B,C,D) include data which is hidden & filtered.

    I also forgot to mention that, vba code should have no impact on the source workbook, any format changes once data is copied over in the new workbook should only be on the new workbook, ideally there should be no change in source workbook after the macro has been run.

    Thanks

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

    Re: Export Worksheets from Source Workbook into a new Workbook

    Try this...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Export Worksheets from Source Workbook into a new Workbook

    Thanks a lot of this code, works like magic.

    I am trying to understand the mechanics of this code, correct me if I am wrong. The code is creating a new workbook with specified number of worksheets and tab names and after that it is coping over data from the corresponding tab name in the source workbook.

    Is there a way I can retain the column width and row height?

    Thanks
    Last edited by dhaval3547; 10-30-2012 at 09:33 AM.

+ 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