We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
sBatFile = "o:\Automation\test.bat" Set oShell = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") If Not oFSO.FileExists(sBatFile) Then MsgBox "Could not find batch file, quitting!", _ vbCritical + vbSystemModal, "Text search" WScript.Quit End If ' just in case there is spaces in the path sBatFileShort = oFSO.GetFile(sBatFile).ShortPath ' Run the batch file, and let the VBScript wait for ' the batch file to finish oShell.Run sBatFileShort, 1, True 'open Excel Set Ex = CreateObject("Excel.Application") With Ex .Visible = True .Workbooks.Open "O:\Automation\Daily Template.xlsm", , , , ,"pw" End With
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.