+ Reply to Thread
Results 1 to 3 of 3

Macro to Copy and Save to A New Workbook

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Macro to Copy and Save to A New Workbook

    Hi guys,
    Need your help again with another Macro. Hoping for one that will copy and save content of a sheet to a new workbook.

    I have a Worksheet (Worksheet Name is "Reviews" that has some Macros in it (Buttons too).
    I would like to have a Save button that will:

    - Copy contents of my existing worksheet from B7 to D7 all the way down to the last record (The Macro must not be copied).
    - Copy to a New Workbook and I will be prompted where to save and what file name to save it.

    Can this be done? Sorry, I've searched thru the forum but I am having trouble looking for anything that will
    match my requirements. Hope you can help. Thank you.


    PS
    I have been asking for help quite lately, please don't get tired of me ^^
    Last edited by Andrew.Trevayne; 08-27-2012 at 01:47 AM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro to Copy and Save to A New Workbook

    Heres a sample

    Sub copyValues()
     Dim a As Variant
     a = Worksheets("Reviews").Range("B7:D" & Cells(Rows.Count, "B").End(xlUp).Row)
     
     Workbooks.Add
     Range("a1").Resize(UBound(a), UBound(a, 2)) = a
     Application.Dialogs(xlDialogSaveAs).Show
     
    End Sub
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Macro to Copy and Save to A New Workbook

    Please ignore. I've solved it ^^
    Thank you.

    ---------- Post added at 12:48 AM ---------- Previous post was at 12:47 AM ----------

    Thank you Mike, I recorded a Macro instead.
    Let me try your code, mine is quite messy ^^

+ 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