Running Batch File from within Excel
On Mon, 16 Aug 2010 01:06:52 +0100, "RB Smissaert"
wrote:
RetVal = Shell("G:\From G Data\Data Files & Test Programs\Work
Data\zipbatch.bat", 1)
Is this a valid file path. I am thinking of the & here.
Otherwise try with code like this:
Thanks very much for taking the trouble to reply. Actually it turns
out that the '&' *was* causing the failure. I tried on a folder with
no ampersand in its name, and everything worked perfectly.
I never expected that, as the batch file itself was quite happy with
the ampersand in the path name.
This shouldn't be a problem in practice, as I don't think any of the
folders I will actually be using (as opposed to the one I tried for
testing - bad choice!!) have ampersands in their name.
But, is there a way of using a path with an ampersand in it?
Anyway, thanks again for your help - it was invaluable!
Chris.
|