Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open Batch File For Processing


I want to open BATCH.bat in a macro.
I tried 'ReturnVal = Shell("C:\BATCH.bat", 1)' and it opens a DO
window and runs through about 20 different command lines very quickl
without executing any of them.

HELP

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=38566

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Open Batch File For Processing

You have another reply at your other thread.

Chuckles123 wrote:

I want to open BATCH.bat in a macro.
I tried 'ReturnVal = Shell("C:\BATCH.bat", 1)' and it opens a DOS
window and runs through about 20 different command lines very quickly
without executing any of them.

HELP.

--
Chuckles123
------------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...o&userid=14948
View this thread: http://www.excelforum.com/showthread...hreadid=385662


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Batch

I have two files file1.xls & file2.xls. I first open file1.xls, subsequently
through VBA code in file1.xls, I need to open file2.xls and execute an macro
in file2.xls. Do anybody have suggestions?

I am able to open file2.xls through this command, but unable to execute any
macro in that.
Workbooks.Open Filename:=

Thanks
Mahendhra
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Batch

Hi Mahendra,

Try:

Application.Run ("File2.xls!YourMacroName")


---
Regards,
Norman



"Mahendhra" wrote in message
...
I have two files file1.xls & file2.xls. I first open file1.xls,
subsequently
through VBA code in file1.xls, I need to open file2.xls and execute an
macro
in file2.xls. Do anybody have suggestions?

I am able to open file2.xls through this command, but unable to execute
any
macro in that.
Workbooks.Open Filename:=

Thanks
Mahendhra



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Batch

Thanks!! It is working for me now.

"Norman Jones" wrote:

Hi Mahendra,

Try:

Application.Run ("File2.xls!YourMacroName")


---
Regards,
Norman



"Mahendhra" wrote in message
...
I have two files file1.xls & file2.xls. I first open file1.xls,
subsequently
through VBA code in file1.xls, I need to open file2.xls and execute an
macro
in file2.xls. Do anybody have suggestions?

I am able to open file2.xls through this command, but unable to execute
any
macro in that.
Workbooks.Open Filename:=

Thanks
Mahendhra






Reply
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
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Excel Discussion (Misc queries) 2 August 18th 06 03:54 PM
batch file to open multiple worksheets Kurt S Excel Discussion (Misc queries) 4 June 12th 06 07:45 PM
How can I batch open a txt file in excel 2003 and save back as a . P Silzle Excel Discussion (Misc queries) 3 February 9th 05 11:44 PM
Create a batch file from a number of Excel File Vinay[_2_] Excel Programming 0 September 8th 04 01:11 AM
Batch Open and Save James[_27_] Excel Programming 1 September 1st 04 05:01 PM


All times are GMT +1. The time now is 12:34 PM.

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"