ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call an XLS that is one directory €œUP€ from where the VBS file is? (https://www.excelbanter.com/excel-programming/340783-call-xls-one-directory-%E2%80%9Cup%E2%80%9D-where-vbs-file.html)

CRayF

Call an XLS that is one directory €œUP€ from where the VBS file is?
 
How do I call the XLS that is one directory €œUP€ from where the VBS file is
located? (VBS is located in a subdir) I tried
=== XLApp.Workbooks.Open "..\RaceBetting.xls" === but that did not work.

RaceBetting.vbs:
-----------------
Dim XLApp
Dim XLWkb
Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = true
XLApp.Workbooks.Open "RaceBetting.xls"
XLApp.ActiveWorkbook.RunAutoMacros 1


arno

Call an XLS that is one directory €œUP€ from where the VBS file is?
 
How do I call the XLS that is one directory €œUP€ from where the VBS
file is
located? (VBS is located in a subdir) I tried
=== XLApp.Workbooks.Open "..\RaceBetting.xls" === but that did not

work.

ChDir ".."

arno



All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com