+ Reply to Thread
Results 1 to 3 of 3

Copy multiple sheets to a new workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    02-15-2014
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    76

    Copy multiple sheets to a new workbook

    Hi All!

    I am looking for some code to copy the exact values in a couple sheets over to a new workbook. There are images in the sheet that need to come over and formatting of cells including merging.

    Could anybody give me a hand. I've tried a number for sources

    Sub CopyItOver()
       Dim Output As Workbook
       Dim Current As String
       Dim FileName As String
      
       FileName = Worksheets("WC").Range("W1").Value  
       
        Set Output = Workbooks.Add
        Current = ThisWorkbook.FullName
       
      ThisWorkbook.Worksheets("WC").Range("A1:M110").Copy
      
      With Output.Worksheets("Sheet1").Range("A1")
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
            End With
      
      Output.SaveAs FileName, XlFileFormat.xlOpenXMLWorkbook
      
    End Sub

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    330

    Re: Copy multiple sheets to a new workbook

    if you are copying images etc would it not be easier to duplicate the sheet and then convert equations to values?
    ThisWorkbook.sheets("WC").Copy
    
    ActiveWorkbook.Worksheets("WC").Range("A1:M110").Copy
    Range("A1:M110").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  3. #3
    Registered User
    Join Date
    02-15-2014
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    76

    Re: Copy multiple sheets to a new workbook

    That works great! Only thing I've really run into would be removing hidden cells.

    Thanks a bunch!

    How do I update the Post to solved?

+ 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] Macro to copy cells from multiple sheets in workbook to multiple sheets in other workbook
    By KeithMale in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 05:37 PM
  2. Replies: 3
    Last Post: 09-07-2012, 02:50 PM
  3. Copy rows from multiple sheets in one workbook into a different workbook
    By maneeshagr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2012, 06:24 AM
  4. Copy multiple sheets to new workbook
    By NTB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2010, 08:53 AM
  5. Copy multiple sheets to new workbook
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2007, 11:48 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