I'm running the following VBA part of code that runs through a Macro, saves it, and closes out of the workbook when completed. I need some modifications to it that will automate this process, and run it as a scheduled task:
Private Sub Workbook_Open()
If ActiveSheet.Cells(1, 11) = "Custom Attribute 3" Then
'nothing to do as alrady done
'fill extra columns
'now save and close
ActiveWorkbook.Close SaveChanges:=True, Filename:="active-transform.xls"
-If the filename "active-transform.xls" already exists at the destination location, I am getting a prompted that the filename already exists in the location, and if I want to replace it. I want to always overwrite the filename without the prompt.
-The destination worksheet "active-transform.xls" also has the macro run when I open it, which I don't want to do. I only want the macro to run when opening the source spreadsheet. When i open the active-transform.xls, it runs the macro, and overwrites the changes from the initial macro run.
-How do I set this up as a scheduled task, so it is completely automated and hands free. I have a dedicated machine that gets an xls file injected to it on a daily basis. I want to schedule the running of the macro at a set time, or essential, schedule excel to open the particular xls, which will essentially run the macro.