first a folder must be opened in the main folder
then create a command button in the sheet. and if it is not named as commandbutton1 name it like that
now insert this event code there(right clilck the sheet tab and click view code)
Private Sub CommandButton1_Click()
Dim Filename As String, Filepath As String
Filename = ThisWorkbook.Name
Filepath = ThisWorkbook.Path & "\Log1\"
'===================================================
'NewFileName = Application.GetSaveAsFilename(InitialFileName:=Filepath & Filename & " " & Format(Now(), "mmddyy") & ".xls")
'If NewFileName = "FALSE" Then Exit Sub
'
'ActiveWorkbook.SaveCopyAs Filename:=NewFileName
'
'On Error Resume Next
'
'ActiveWorkbook.SaveAs ThisWorkbook.FullName
'==========================================================
ThisWorkbook.SaveAs Filepath & Filename & " " & WorksheetFunction.Text(Date, "mmddyy") & ".xls"
ThisWorkbook.Save
End Sub
Bookmarks