Results 1 to 19 of 19

How do I save a WorkBook using only select cells macro

Threaded View

  1. #1
    Registered User
    Join Date
    04-21-2017
    Location
    IReland
    MS-Off Ver
    2010
    Posts
    10

    How do I save a WorkBook using only select cells macro

    Hey,

    I need to save a Workbook using only selected sheets....

    I have this at the moment which is working, but it is saving the whole workbook, and I need it to work with only the range "A1:K40"

    Sub SaveInvWithNewName()
        Dim NewInv As Variant
        ActiveSheet.Copy
        NewInv = "C:\Invoices\LeeValley-Inv" & Range("F2").Value & ".xlsx"
        ActiveWorkbook.SaveAs NewInv
        ActiveWorkbook.Close
        MsgBox "File Saved to C:\Invoices"
        NextInvoice
    End Sub


    I tried this but didnt work - any ideas?

    Sub SaveInvWithNewName()
        Dim NewInv As Variant
        ActiveSheet.Copy
        NewInv = "C:\Invoices\LeeValley-Inv" & Range("F2").Value & ".xlsx"
        ActiveWorkbook.Range("A1:K40").SaveAs NewInv
        ActiveWorkbook.Close
        MsgBox "File Saved to C:\Invoices"
        NextInvoice
    End Sub
    Last edited by jeremiasapaz; 04-27-2017 at 05:10 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA / Macro to Select File and Save As
    By bloomingcarrot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2015, 01:13 AM
  2. [SOLVED] Macro to save workbook - Create Directories / Sub-Directories Based using text in cells
    By kspeese in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2014, 01:21 PM
  3. [SOLVED] Save the split the workbook file type as Excel Binary Workbook From Run Macro
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 05:09 AM
  4. Macro to open a closed workbook and select copy cells into an open workbook
    By helloganesh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2013, 02:00 PM
  5. [SOLVED] Macro to pull out data from specific cells and save it in another workbook
    By kittu55 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-02-2013, 11:02 AM
  6. Macro to select cells and save as html
    By itmanusa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-27-2010, 09:20 AM
  7. [SOLVED] Select sheet tabs in workbook & save to separate workbook files
    By stratocaster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2006, 11:40 AM

Tags for this Thread

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