Technowolf
Board Regular
- Joined
- Aug 28, 2014
- Messages
- 181
Trying to figure out how to do this via VBS. First, check if the workbook is open, and if so, run the macro in it.
I found this, but this opens a readonly version in the background and runs it, which is no good for my purposes
Suggestions?
I found this, but this opens a readonly version in the background and runs it, which is no good for my purposes
Code:
Option Explicit
Dim xlApp, xlBook
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("C:/Temp Code Setup2.xlsm", 0, True)
xlApp.Run "RunnerFile"
xlBook.Close
xlApp.Quit
Set xlBook = Nothing
Set xlApp = Nothing
WScript.Quit
Suggestions?