Is there a way to launch Excel in the background at system boot up and run a VBA macro to write information to a log file, then quit Excel?
Printable View
Is there a way to launch Excel in the background at system boot up and run a VBA macro to write information to a log file, then quit Excel?
As far as I know you can't run it in the background using a command-line switch. You could write an external app to call excel using its com interface. You could even use vbscript to do this if it is enabled on the system which is similar in syntax to vba. If a *.vbs file can't be run at startup you could call it from a batch file or something.
if you create a shortcut to a workbook, in the startup folder, you can have code in startup to set the application to visible = false, write your log file then quit the application without saving anything
Thanks guys, the suggestions worked great! I put a shortcut of the vbscript file in the startup folder and everything works perfectly; Excel launches in background upon system boot and the log file gets updated w/o any sign that anything happened. Slick.