Results 1 to 5 of 5

save .xlsx from active sheet, with sheet name, same address of current workbook

Threaded View

Mikeswell save .xlsx from active sheet,... 10-27-2014, 08:40 PM
Leith Ross Re: save .xlsx from active... 10-27-2014, 08:58 PM
Mikeswell Re: save .xlsx from active... 10-30-2014, 06:22 PM
Leith Ross Re: save .xlsx from active... 10-30-2014, 06:39 PM
Mikeswell Re: save .xlsx from active... 10-31-2014, 12:14 PM
  1. #1
    Registered User
    Join Date
    10-27-2014
    Location
    Cartagena, Colombia
    MS-Off Ver
    2007
    Posts
    3

    save .xlsx from active sheet, with sheet name, same address of current workbook

    I try to save a new file .xlsx with the name of the worksheet, it works with .xls but I needed in a new version. Txs

    The code I'm using is:
    Sub save_active ()
    'when I change it to ".xlsx" It doesnt work
    'display the msg "file is corrupted"
    MName = ActiveSheet.Name & ".xls"
    MDir = ActiveWorkbook.Path
    ActiveWorkbook.SaveAs Filename:=MDir & "\" & MName
    
    End Sub
    Last edited by Leith Ross; 10-27-2014 at 08:54 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] save active sheet in new workbook, naming it as cell value of active sheet
    By arkharova.s in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2014, 06:16 AM
  2. Save Active Sheet to another Workbook
    By Wes28 in forum Excel General
    Replies: 5
    Last Post: 11-04-2008, 11:15 AM
  3. Save current active sheet only
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2008, 05:03 AM
  4. Command button - to copy active sheet and not save current workbook
    By vjboaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2008, 05:23 PM
  5. Save active sheet into new workbook
    By MarkN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2006, 10:10 PM

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