Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Excel to Run a Batch File?!?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
carla - 19 Jan 2007 08:54 GMT
Hi

I am running Office 2003.  I have designed an excel spreadsheet using
various macros.  I now need a macro designed that can run a batch file.
Is this possible?

Hope you guys can help!

Thanks Alot

Carla
Gord Dibben - 19 Jan 2007 16:43 GMT
Carla

Sub Run_Batch()
Dim taskID As Variant
   On Error Resume Next
   Shell ("C:\yourbatch.bat"), vbNormalFocus
   If Err <> 0 Then _
           MsgBox "yourbatch.bat is Missing"
End Sub

Gord Dibben  MS Excel MVP

>Hi
>
[quoted text clipped - 7 lines]
>
>Carla
Chip Pearson - 20 Jan 2007 02:32 GMT
See the Shell function. If you need to wait for the Shell'd process to end
before continuing your code execution, see
http://www.cpearson.com/excel/shellandwait.htm.

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

> Hi
>
[quoted text clipped - 7 lines]
>
> Carla
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.