Thread: excel save
View Single Post
  #5   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

Public Sub SaveButton_Click()
Const sPath As String = "<your path here"
Const sFName As String = "MyFile_"
ThisWorkbook.SaveAs _
Filename:=sPath & Application.PathSeparator & _
sFName & Format(Now, "yyyymmdd_hhmmss.xl\s"), _
FileFormat:=xlNormal, _
ReadOnlyRecommended:=True
End Sub


In article ,
Lins wrote:

i am running a data logger into excell and would like to run a macro at
the end of the day to save the data collected. i would like thid to be
done at the end of each day automatically by pressing a macro button
and the file will be saved under a new name each time