+ Reply to Thread
Results 1 to 4 of 4

Running Macros from Command line

  1. #1
    Registered User
    Join Date
    07-25-2005
    Posts
    2

    Running Macros from Command line

    Is there any way to run a macro from the command line while opening excel?
    ie: c:\xxxxxxxx.xls "macroname"
    ?

    if not, basically I am trying to write a program that reads all of the files in a directory, and for all of the excel files, it opens them, runs a specific macro on them, and then saves and closes them.

    Does anyone have any ideas?

  2. #2
    Gareth
    Guest

    Re: Running Macros from Command line

    If you're writing in VB or VB.NET I would use OLE to open up the Excel
    files and process them, with your code running in the application.

    Would that help?

    DrukeEr wrote:
    > Is there any way to run a macro from the command line while opening
    > excel?
    > ie: c:\xxxxxxxx.xls "macroname"
    > ?
    >
    > if not, basically I am trying to write a program that reads all of the
    > files in a directory, and for all of the excel files, it opens them,
    > runs a specific macro on them, and then saves and closes them.
    >
    > Does anyone have any ideas?
    >
    >


  3. #3
    Registered User
    Join Date
    07-25-2005
    Posts
    2
    It would have, except I do not know how to use OLE

  4. #4
    Gareth
    Guest

    Re: Running Macros from Command line

    If you give more details on what you're developing in and the scope I
    can demonstrate code. OLE is easy - the same as developing on VB really
    - if that's what you're doing.

    DrukeEr wrote:
    > It would have, except I do not know how to use OLE
    >
    >


+ 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