LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Running Batch File from within Excel

On Mon, 16 Aug 2010 19:20:02 -0700, Mike S wrote:



Apologies, CurDir works in VB6 but not VBA I test this in an Excel 2000
macro and it worked, so I think this may work for you:

Public Sub doin()
Dim path As String
ChDir "C:\From G Data\Data Files & Test Programs\Work Data"
path = CurDir
MsgBox path
End Sub

ChDir "G:\From G Data\Data Files & Test Programs\Work Data\"
ExecCmd "zipbatch.bat", 15, True, ""

Sorry for not testing before posting, I need to remember that there are
some differences between VB6 and VBA.



Mike - thanks for your trouble. I did say you were dealing with a
novice, and, to be honest, simply not using ampersands in folder names
is a much simpler solution for me!

But I do appreciate your time. Thanks again.

Chris.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
batch file to ftp code not running - please help! WhytheQ Excel Programming 0 February 10th 10 05:55 PM
Running a Batch file from VBA D.riggins Excel Programming 6 September 1st 09 08:54 PM
running a batch file Mohan[_2_] Excel Programming 3 April 10th 04 10:48 PM
Running a batch file from VB Graham Carter Excel Programming 3 August 29th 03 04:18 PM
Running a batch file from Excel VBA verizon Excel Programming 1 July 20th 03 09:27 AM


All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"