World!
I am trying to automate a report task at my job and I have the following situation:
I need to execute a macro on a workbook by using a script. I tried to write a vbscript to do the job, and this is the significant part of it:
Set objWbk = GetObject("***Path***\test.xlsm")
objWbk.Application.Run "test.xlsm!test"
WScript.Quit
The macro runs perfectly. My real problem is that I only want to do the report only if the workbook is open.
Is there a way (in vbs or vba) to determine if that workbook is open ? (by the way, it is located on another computer on my network)