Simple VBScript - Autorun macro every night?
I want to run a macro in one of my excel files (on our server) every morning at 4am. I want the macro to runautomatically even when I am not logged in. How do I do this?
I have learned that I can create a .VBS file and use Control Panel > Scheduled Tasks to have the VBS file executed every morning. I have no clue how to write the 4 lines of VBS code that I need. I can show a messagebox with "msgbox("hello")". I need to open an Excel file, run the macro, and close the Excel file. It should be about three lines of code. I cannot figure out how to open an Excel file from the VBScript. I have been coding a fair amount of VBA and hae read extensivley about VBA coding. This should be simple, but I don't know where to start.
Thanks for any help,
Brad