I have a macro that works as it should when I manually run it. I've tried using Application.Ontime to have it run at 3pm but so far that hasn't worked.
- Sub SaveAs()
- Application.OnTime TimeValue("15:00:00"), "SaveAs"
- Dim MyFile As String
- MyFile = ActiveWorkbook.Name
- ' Do not display the message about overwriting the existing file.
- Application.DisplayAlerts = False
- ' Save the active workbook with the name of the
- ' active workbook. Save it on the Desktop
- ActiveWorkbook.SaveAs Filename:="C:\Users\camp\Desktop\Backup\" & MyFile
- ' Close the workbook by using the following.
- End Sub