title: Excel Macro to set a default filename when saving
body: <p>I am not a programmer, but I understand a little about it. I currently have a macro in word that saves a new document with a default name and current date. I am trying to do the same in excel 2010 but don't know how.</p>
  
  <p>Any help would be greatly appreciated.
  This is the macro for word that I use.</p>
  
  <pre><code>Sub FileSave()
      If ActiveDocument.Path = "" Then
                  With Dialogs(wdDialogFileSaveAs)
              .Name = MakeDocName 
              .Show
          End With
      Else
          ActiveDocument.Save
      End If
  End Sub
  
  Function MakeDocName() As String
      Dim theName As String
      Dim uscore As String
      uscore = "_"
  
      theName = "DocType_DocDescription_"
      theName = theName &amp; Format(Now, "yyyy-mm-dd")
  
  
  
      MakeDocName = theName  
  End Function
  
  Sub FileSaveAs()
       With Dialogs(wdDialogFileSaveAs)
              .Name = MakeDocName  
              .Show                
  End With
  
  End Sub
  </code></pre>