+ Reply to Thread
Results 1 to 2 of 2

Copy sheets to a new workbook

  1. #1
    Registered User
    Join Date
    06-21-2014
    Location
    Egypt
    MS-Off Ver
    MS 2010
    Posts
    72

    Unhappy Copy sheets to a new workbook

    Dear All,

    I have a riddle here confusing me , I did a file where it create a sheets with names based on varibales i provide , so far it is working perfect however i wanted to export those data to a new excel workbook instead being in the same workbook as additional sheets , so i tried below , it create a new work book but don't paste selection to it .

    Sub Button12_Click()
    On Error Resume Next

    Dim Num As Long
    Dim Val As String
    (......)

    Val = Sheets("Source Data").Range("F2").Value
    ActiveSheet.Name = Val
    Worksheets(nname.Value).Cells.Select.all
    Worksheets(nname.Value).Cells.Selection.Copy
    Sheets(nname.Value).Move after:=Worksheets(Worksheets.Count)

    Workbooks.Add
    ActiveWorkbook.SaveAs Filename:=Val & ".xls"
    Windows(Val & ".xls").Activate
    ActiveSheet.Paste


    What i need help in :
    1) to copy all sheets after a sheet called " Summary " and paste those in new workbook i created with the name of variable val
    2) asking if i could instead of set name automatically from my side , if it is possible to make it show a save as/export file box to let user pick name and place , that would be much convenient

  2. #2
    Registered User
    Join Date
    06-21-2014
    Location
    Egypt
    MS-Off Ver
    MS 2010
    Posts
    72

    Re: Copy sheets to a new workbook

    Any help here plz ???

+ 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] Copy All Visible Sheets To New Workbook Excluding Specific Sheets
    By ezrizer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-19-2012, 02:19 PM
  2. Replies: 4
    Last Post: 09-15-2012, 02:18 PM
  3. [SOLVED] Copy All Sheets From Each Workbook in Folder to a Single Sheet in New Workbook
    By DHartwig35805 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2012, 03:53 PM
  4. Copy sheets from different workbooks to specific sheets in one workbook
    By erikfae in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2011, 08:02 AM
  5. Automatically Copy sheets in one workbook to create sheets in a new workbook..
    By leebarratt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2011, 03:14 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