Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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 On 19 Jan 2007 00:54:17 -0800, "carla" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Carla,
Check out the Shell command in VB help. and use a command along the lines of:- returnedvalue=Shell("C:\yourpath\yourfile.bat", 1) Mike "carla" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "carla" wrote in message oups.com... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Need to Query Excel File Opened by Another User | Excel Discussion (Misc queries) | |||
Retaining formats | Excel Discussion (Misc queries) | |||
importing a particular excel worksheet into another excel file | Excel Worksheet Functions | |||
How do I unlock FILE access? | Excel Discussion (Misc queries) |