+ Reply to Thread
Results 1 to 5 of 5

Open Batch File For Processing

  1. #1
    Forum Contributor
    Join Date
    10-03-2004
    Posts
    102

    Question 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 DOS window and runs through about 20 different command lines very quickly without executing any of them.

    HELP.

  2. #2
    Dave Peterson
    Guest

    Re: 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. #3
    Mahendhra
    Guest

    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. #4
    Norman Jones
    Guest

    Re: Batch

    Hi Mahendra,

    Try:

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


    ---
    Regards,
    Norman



    "Mahendhra" <[email protected]> wrote in message
    news:[email protected]...
    >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. #5
    Mahendhra
    Guest

    Re: Batch

    Thanks!! It is working for me now.

    "Norman Jones" wrote:

    > Hi Mahendra,
    >
    > Try:
    >
    > Application.Run ("File2.xls!YourMacroName")
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Mahendhra" <[email protected]> wrote in message
    > news:[email protected]...
    > >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1