PC2 needs to access the files on PC1,
thus sysvar on PC2 defines PC1DriveD as a networked drive letter.
Same sharing concept needed if use USB with fname and attach to laptop.
My .bat code worked flawlessly using %PC1DriveD%\fname.xlsm
Now, using .vbs, this works:
Set oxl = CreateObject("excel.application")
Set owb = oxl.Workbooks.Open("d:\fname.xlsm")
THIS DOES NOT WORK:
Set owb = oxl.Workbooks.Open("%PC1d%\fname.xlsm")
FYI, this is accepted, but then the file is NOT FOUND
MyPath = "%PC1d%\fname.xlsm"
Set owb = oxl.Workbooks.Open("MyPath")
I've actually spent weeks unsuccessfully trying to resolve this puzzle
THANKS!
Bookmarks