Save book today

bluefeather8989

Active Member
Joined
Nov 20, 2009
Messages
331
Office Version
  1. 365
Platform
  1. Windows
I have a workbook named "History".
I need as to save it in same folder but as today's date. (its an xlsm btw)
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Possibly this is what you are asking for:

With ThisWorkbook
.SaveAs Filename:=.Path & "\History " & Format(VBA.Date, "mmmm dd yyyy") & ".xlsm"
End With
 
Upvote 0
Possibly this is what you are asking for:

With ThisWorkbook
.SaveAs Filename:=.Path & "\History " & Format(VBA.Date, "mmmm dd yyyy") & ".xlsm"
End With
This Wont work here is my code. I hope some one can figure it out:confused::confused:
i don't need the word history. all i want is to save as today's date


Code:
Sub reset_all()
Windows("History.xlsm").Activate
  Sheets("Race History").Select
  Range("A1").Select
'reset Race
'
'reset race only
Windows("Race.xlsm").Activate
Sheets("race").Select
    Range("CA:CA,BW:BW,BS:BS,BL:BL,BH:BH,BD:BD,AW:AW,AS:AS,AL:AL,AH:AH,AA:AA,W:W,S:S,L:L,H:H,D:D").Select
    Selection.ClearContents
    Range("A1").Select
'Save and close "Race"
Windows("Race.xlsm").Activate
    ActiveWorkbook.Save
    ActiveWindow.Close
'
'Reset Interface
Windows("DerbyExcel.xlsm").Activate
Sheets("Interface").Select
    Range("C36:E41").Select
    Selection.ClearContents
    Range("A28:C29").Select
    Selection.ClearContents
    Range("A1:L1").Select
    ActiveWindow.ZOOM = True
    Range("A1").Select
'Reset Looking
Windows("DerbyExcel.xlsm").Activate
Sheets("Looking").Select
    Range("B8").Select
    Selection.ClearContents
   Range("B12").Select
    Selection.ClearContents
    Range("A1").Select
'Reset sort
    Sheets("Sort").Select
    Range("Q16:Q18").Select
    Selection.ClearContents
    Range("A1").Select

'Reset 101-901
Sheets("901").Select
    Range("G4:J67").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("601").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("501").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("401").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("301").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("201").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select
Sheets("101").Select
    Range("G4:J35").Select
    Selection.ClearContents
    Range("G4:J4").Select

'Reset Division
Sheets("Division").Select
    Range("E3:E7").Select
    Selection.ClearContents
    Range("E3").Select
    

Sheets("Division").Select
Range("A1").Select
ActiveWindow.WindowState = xlMaximized
      Application.DisplayFullScreen = True
        Range("E3").Select
        ActiveWindow.DisplayHeadings = False
        ActiveWindow.DisplayGridlines = False
        Application.DisplayFormulaBar = False
        Application.ScreenUpdating = True
  Application.ScreenUpdating = False
             Range("A1:J1").Select
    ActiveWindow.ZOOM = True
  Range("E3").Select
  
  ActiveWorkbook.Save
    ActiveWorkbook.Close
    
  Windows("History.xlsm").Activate
  Sheets("Race History").Select
With ThisWorkbook
.SaveAs Filename:=.Path & "\History " & Format(VBA.Date, "mmmm dd yyyy") & ".xlsm"
End With
ActiveWorkbook.Close
    
   
End Sub
 
Upvote 0
This Wont work here is my code. I hope some one can figure it out:confused::confused:
i don't need the word history. all i want is to save as today's date

And you are saying, given your code, that this line here:

.SaveAs Filename:=.Path & "\History " & Format(VBA.Date, "mmmm dd yyyy") & ".xlsm"

cannot be amended to

.SaveAs Filename:=.Path & "\" & Format(VBA.Date, "mmmm dd yyyy") & ".xlsm"


What happend when you tried that?
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top