Hi,

Macro function
I have a macro that checks whether a specific workbook is open on a local machine.

Running from excel
When I run the macro from within excel it works perfectly.

Running from a vbs file
When I run the macro from a vbs it DOESN’t work. Nothing wrong with vbs. I have confirmed that. The vbs runs all code within the macro except for checking whether the workbook is open.

My plan
I am thinking of getting excel to create a text file if workbook is open and get vbs to throw error if it detects that text file. Any thoughts? Thanks!


Any suggestions would be greatly appreciated.