Calling an excel macro in dos

  1. #1
    kathy32181 is offline Newbie

    Calling an excel macro in dos

    Hi, I'm kind of a newbie at dos, and i was wondering what the code was to run an excel macro from dos. Thanks!

    Kate


  2. #2
    HippyWarlock is offline Elite Member
    Hmm? My first reaction would be can't do it.... But you can get EXCEL to recognize comma-separated files that DOS could output, but that wouldn't overly help

    Maybe you could compile a macro and get DOS to call it??

    What Ver of EXCEL and DOS are you using?

    I think you're gonna need some VB tech-heads here.

    Can I ask why you want to run an EXCEL macro from DOS?

  3. #3
    HippyWarlock is offline Elite Member
    But I did find this snippet in my searchings:

    DO NOT change to another diskette and then issue "R" when the message "Abort, Retry, Ignore?" is being displayed after attempting to modify a write-protected diskette.

    Doing so will corrupt the entire FAT.

    There's no such thing as useless information :-)

  4. #4
    kathy32181 is offline Newbie
    Hi Hippy, thanks for responding!

    I'm using the windows 2000 version of excel and DOS. I am trying to automate a series of programs, most i can call through excel or excel macros, but a couple programs i have to call with DOS. I was thinking that the easiest (most efficient) way for me to program this would be entirely through DOS, but if it's not possible to call a macro through DOS, I can always just call a workbook with an 'auto_open' macro. otherwise, do you know if I can call the dos command file through an excel macro?
    btw: thanks for the second post, i'll definitely keep that in mind

    Thanks again,
    Kate

  5. #5
    HippyWarlock is offline Elite Member
    Yes you could call DOS from 97 excel (not up to speed methinks) and DOS used to have a shell command which I can't find now.

    maybe worth looking at the DOSKEY command that I just happened across.

    If you can give me an example I could fiddle about with it.

  6. #6
    kathy32181 is offline Newbie
    Thanks for your help, Hippy! I've decided to just call the workbook and have an Auto-Open macro - it's easiest. Thanks again!

    Kate

+ Reply to Thread