Results 1 to 3 of 3

Thread: Exporting Multiple Worksheets From One Workbook To A New Workbook

  1. #1
    Banned
    Join Date
    May 2013
    Posts
    17
    Rep Power
    0

    Exporting Multiple Worksheets From One Workbook To A New Workbook

    Help please?

    Code:
    Sub Export()
    
        Dim Keyword As String
        
        Keyword = UCase$(Worksheets("INSTRUCTIONS").Range("O24").Value)
        
        Application.DisplayAlerts = False
        
        Select Case Keyword
            Case "AMERICAS"
                Sheets("CLASSIFIED-americas").Copy
                Sheets("SUMMARY-americas").Copy
                With ActiveWorkbook
                    .Title = "Classified"
                    .Close True
                End With
            
            Case "RRRS"
                Sheets("CLASSIFIED-RRRS").Copy
                Sheets("SUMMARY-RRRS").Copy
                With ActiveWorkbook
                    .Title = "Classified"
                    .Close True
                End With
            
            Case "RRR"
                Sheets("CLASSIFIED-RRR").Copy
                Sheets("SUMMARY-RRR").Copy
                With ActiveWorkbook
                    .Title = "Classified"
                    .Close True
                End With
        End Select
        Application.DisplayAlerts = True
    
    End Sub
    I wanted to export 2 worksheets in a single workbook. Please Help!

    Thank you in advance.

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    use it like this

    Code:
                Sheets(Array("CLASSIFIED-americas","SUMMARY-americas")).Copy
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Banned
    Join Date
    May 2013
    Posts
    17
    Rep Power
    0
    Thank you very much!

Similar Threads

  1. Protect All Worksheets Before Closing The Workbook
    By rich_cirillo in forum Excel Help
    Replies: 7
    Last Post: 07-14-2013, 10:00 PM
  2. Replies: 4
    Last Post: 06-20-2013, 04:25 PM
  3. Replies: 2
    Last Post: 05-28-2013, 05:32 PM
  4. Replies: 2
    Last Post: 12-19-2012, 08:28 AM
  5. Split Closed Workbook into Multiple Workbooks Using ADO
    By ramakrishnan in forum Excel Help
    Replies: 4
    Last Post: 10-02-2011, 08:34 PM

Posting Permissions

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