+ Reply to Thread
Results 1 to 4 of 4

DOS BATCH file to open excel and run macros

  1. #1
    Registered User
    Join Date
    07-25-2011
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    29

    DOS BATCH file to open excel and run macros

    I need to open an excel workbook and run two separate macros from a dos .bat file.

    Is this possible?

  2. #2
    Registered User
    Join Date
    07-25-2011
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: DOS BATCH file to open excel and run macros

    I am running Excel version 12.

  3. #3
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: DOS BATCH file to open excel and run macros

    I don't think a .bat file can do this. Have a look at VBScript (.vbs file) instead.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: DOS BATCH file to open excel and run macros

    You can use the .bat to open the file, however, you might want to use Workbook_Open of the file to trigger the routines...

    Note you would need to account for Macro Security settings.... and you might also consider using a Scheduler of some sort.

+ 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