Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am exectuing a Shell function from VBA that executes a .bat file which issues a java call.
START "CSV Loader" javaw -DINSTALL_DIR="C:\Program Files\GPM\qa\" -classpath "../../lib/jlicense.jar;../../lib/enyevent.jar;../../lib/enyobjex.jar;../../lib/enyware.jar;../../lib/enyeventutils.jar;../../lib/enycom.jar;../../lib/enycomimq.jar;../../lib/enycomseebeyond.jar;../../lib/enytoplink.jar;../../lib/enyutils.jar;../../lib/swingextras.jar;../../lib/IBMExt.jar;../../lib/jcert.jar;../../lib/jnet.jar;../../lib/jsse.jar;../../lib/jce.jar;../../lib/SAX.jar;../../lib/DOM.jar;../../lib/jdom.jar;../../lib/jms.jar;../../lib/jmq.jar;../../lib/classes12.zip;../../lib/stcjms.jar;../../lib/te_enabler.jar;../../lib/Sybase_jConnect-5_2.jar;../../lib/csvloader.jar;../../lib" com..loader.CSVLoader -nameURL $INSTALL_DIR$\config\CSVLoader.ini -providerURL com.twsystems.property.file.PropertyFileInterface -CSVFilename "P:\My Documents\CSVSwapLoad.csv"
The problem is I'm running from a directory that is not in the path with the ../.. directory for the jar files.
Is there a way to change the directory of the executing vba code to put it in the same path as the jar files, so the code will recognize the ../.. directory paths?
Thanks

Use ShellExecute you can specify what directory to start in:
ShellExecute Handle, "OPEN", "your.bat", "", "c:\the path", SW_SHOW
This is a Win32 API function call, you you need to include the declaration by selecting ADD-INS/API Viewer
Chi Happens

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |