VBScript to Open an Excel File and then do a Save As
<p>I am trying to write a vba script to automatically open an excel file increase the day by one in a certain cell and then wait 2 minutes for all other field to populate information from the current day. Once the other field are populated I want the script to close the file and save as the day it ran the script. I am going to add this script to windows task manager to run daily at 2 am. so far I have something like this. </p>

<pre><code>Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("c:\Users\dr\Desktop\test.xlsx")

objExcel.Application.Visible = True
objExcel.Workbooks.Add
objExcel.Cells(3, 2).Value = "=today()"

WScript.Sleep 120000

wb.SaveAs Format( Now(), “DD-MMM-YY”)
</code></pre>