1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Script running - possibiliites

Discussion in 'Legacy Windows' started by matpj, 2006/05/03.

  1. 2006/05/03
    matpj

    matpj Inactive Thread Starter

    Joined:
    2006/05/01
    Messages:
    4
    Likes Received:
    0
    HI,

    i'm not sure if this is ossible or not, but I have created an excel workbook containing several worksheets and a macro that refreshes them all.

    what I want to do is have my PC run this at a specified frequency (hopefully in the background)
    Is there any way I can do this?
    the spreadsheet will hopefully be stored on our network. The script will need to opent he spreadsheet, run the macro (which can be set to run on file open) and then close.
    the macro sends an automatic email to a set user)

    can anyone tell me if this can be done?
    if so - how??

    thanks in advance,
    Matt
     
  2. 2006/05/03
    sparrow

    sparrow Inactive

    Joined:
    2004/03/21
    Messages:
    2,282
    Likes Received:
    0
    Windows scheduler (in control panel) might periodically open a batch file containing (or calling) the instructions or script, which would have to close excel and then itself when finished.. From MS
     
    Last edited: 2006/05/03

  3. to hide this advert.

  4. 2006/05/04
    matpj

    matpj Inactive Thread Starter

    Joined:
    2006/05/01
    Messages:
    4
    Likes Received:
    0
    thanks!

    do you have any idea where I can find an example of a script/batch file that might open a spreadsheet?
    I don't know the first thing about batch files etc...

    thanks,
    Matt
     
  5. 2006/05/04
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338
    The exact command you'll need depends on:
    1. Where your Excel.exe program file was installed, and

    2. where your Excel spreadsheet is located as well as its file name.
    As an example, here on this machine, the complete path to Excel.exe is:
    Code:
    
    C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
    
    
    And let's say that the spreadsheet I want to open is:
    Code:
    
    C:\Documents and Settings\SpywareDr\My Documents\Excel\Calendars\2005-2014 yearly calendar1.xls
    
    
    
    The command needed then would be:
    Code:
    
     "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"  "C:\Documents and Settings\SpywareDr\My Documents\Excel\Calendars\2005-2014 yearly calendar1.xls "
    
    
    
    This l-o-n-g command will work, (here on this machine), from:
    • "Start | Run "

    • At a CMD prompt

    • As a command (line) in a BATch file

    • As a shortcut on your Desktop
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.