Results 1 to 10 of 10

Modify macro to save with current file name and date

Threaded View

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Modify macro to save with current file name and date

    I am placing a macro in excel to save a file to our network. It works but it always saves it as a fixed document name. I would like to modify it so I can use it in a blank template. I would like to have the macro save the file under what ever the current document name is with the date the file was saved.



    Sub aSavetonetwork()
    '
    ' a Macro
    ' auto save to network
    '
    
    '
        ChDir _
            "K:\OPERATIONS GEO\Backup of Cross Sections"
        ActiveWorkbook.SaveAs Filename:= _
            "K:\GEO\Backup of Cross Sections\test save macro.xltm" _
            , FileFormat:=xlOpenXMLTemplateMacroEnabled, Password:="", _
            WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
    End Sub
    Last edited by rockhunter; 10-28-2011 at 10:00 AM.

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