+ Reply to Thread
Results 1 to 2 of 2

Save only the Activesheet as a new file

Hybrid View

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    Windsor, UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Save only the Activesheet as a new file

    Hi All

    Please could someone help me out with my question?

    I have some code that allows me to save the a workbook as a new file in a specific location. Which works great. But what I'd like it to do, is only save the activesheet as a new file, and not the whole workbook.

    Is this at all possible?

    below is the code i use:

     Dim SaveName As String
           SaveName = Sheets("Lookup").Range("C35").Text
           ActiveWorkbook.SaveAs Filename:="S:\Services\·Section-Wide Data\MASTER DATA\MyFile\" & _
               SaveName & ".xlsm"
    As always, your help is greatly appreciated!
    Last edited by Broobi; 04-06-2014 at 05:40 PM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Save only the Activesheet as a new file

    Maybe:

    Sub Broobi()
        Dim SaveName As String
        
            SaveName = Sheets("Lookup").Range("C35").Text
            ActiveSheet.Copy
            ActiveWorkbook.Sheets(1).Name = "Sheet1"
            ActiveWorkbook.SaveAs FileName:="S:\Services\·Section-Wide Data\MASTER DATA\MyFile\" & _
               SaveName & ".xlsm"
    
    End Sub

+ 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. Macro to save an excel file (that is not the activesheet) to PDF / multiple users
    By Mdelgado in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 12:46 AM
  2. [SOLVED] Macro: Save ActiveSheet in New Workbook - As Values (INDIRECT function issue)
    By markl41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2012, 04:01 PM
  3. Excel 2010 ActiveSheet save as PDF and attach to Email
    By xmachinex in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2012, 07:38 AM
  4. Save ActiveSheet to PDF
    By rubix in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2010, 09:49 AM
  5. VBA + Excel - Save ActiveSheet as hmt then Send Email
    By mariocatch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2007, 10:52 PM

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