+ Reply to Thread
Results 1 to 5 of 5

Export all worksheets after a specific worksheet into a new workbook with the numbers as v

  1. #1
    Registered User
    Join Date
    02-07-2017
    Location
    Chicago
    MS-Off Ver
    Office 2010 and 2016
    Posts
    8

    Export all worksheets after a specific worksheet into a new workbook with the numbers as v

    Hello everyone,

    I have this workbook I have been working on and I just need help with a macro to get sheets after a certain sheet exported into values. I have attached the worksheet below and my attempt at trying to do this macro. The sheets I need to export are all the sheets after the template sheet.

    Please Login or Register  to view this content.
    Attached is the link to the worksheet https://www.dropbox.com/s/eujzhosl2p...orum.xlsm?dl=0

    Thanks in advance for your help
    Last edited by JBeaucaire; 02-13-2017 at 10:55 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Registered User
    Join Date
    02-07-2017
    Location
    Chicago
    MS-Off Ver
    Office 2010 and 2016
    Posts
    8

    Re: Export all worksheets after a specific worksheet into a new workbook with the numbers

    I have found a way to select all the worksheets including the template by using this macro. How would I unselect the template sheet and move those selected sheets to a newworkbook as values?
    'Select Sheet Macro
    Sub sheetsforexport()
    Dim ws As Worksheet, flg As Boolean
    For Each ws In ThisWorkbook.Sheets
    If ws.Range("a1").Value = 1 Then
    If flg Then
    ws.Select False
    Else
    ws.Select
    flg = True 'This section selects all the sheets that were produced as well as the template
    End If
    End If
    Next
    End Sub

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Export all worksheets after a specific worksheet into a new workbook with the numbers

    How about

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Export all worksheets after a specific worksheet into a new workbook with the numbers

    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    02-07-2017
    Location
    Chicago
    MS-Off Ver
    Office 2010 and 2016
    Posts
    8

    Re: Export all worksheets after a specific worksheet into a new workbook with the numbers

    Thank you guys, these worked perfectly!

+ 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] Export multiple (specific) worksheets to CSV files in a specified directory
    By reghyh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-25-2015, 02:43 AM
  2. Replies: 7
    Last Post: 08-04-2014, 04:55 AM
  3. Export Worksheets from Source Workbook into a new Workbook
    By dhaval3547 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-02-2013, 06:16 AM
  4. Export Worksheets from Source Workbook into a new Workbook
    By dhaval3547 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2012, 09:04 AM
  5. Export two worksheets from a workbook and save with a name
    By thylander in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2011, 11:50 AM
  6. Replies: 1
    Last Post: 02-11-2011, 05:39 PM
  7. Export worksheets from a workbook to the current workbook location path
    By legendkiller420 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2010, 04:08 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