1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Windows Automate excel add-in (macro) to run

Discussion in 'Software' started by Shirty, 26 Nov 2014.

  1. Shirty

    Shirty W*nker! Super Moderator

    Joined:
    18 Apr 1982
    Posts:
    12,474
    Likes Received:
    1,694
    Hi all, I'm normally pretty decent with Excel, but I have a particular scenario that is slightly beyond what I've tried before:

    I have a script which moves a unique Excel spreadsheet with multiple tabbed workbooks into a folder once a day. I need to schedule a task that will open the spreadsheet and run a macro on it, before closing it so that another script can delete it.

    The macro is installed as an add-in currently, though it could be reinstated as a 'traditional' macro if needed. It splits each worksheet into a workbook of its own and saves it as a unique file in a different folder.

    How would I go about automating this process? I'm aware that you can set up Excel to run macros at startup but I've never done it before. Would it automatically run on any new workbook opened, even if not desired?

    Thanks in advance for any help :)
     
  2. jebk

    jebk New Member

    Joined:
    18 Oct 2014
    Posts:
    46
    Likes Received:
    2
    How are you scripting? Powershell can directly manipulate excel spreadsheets through the com module assuming you have office installed on the machine the scripts running on. You're better off writing it at least in outline in excel (unless you are writing it in vs and it knows what the ibjects/methods are)
     
  3. Shirty

    Shirty W*nker! Super Moderator

    Joined:
    18 Apr 1982
    Posts:
    12,474
    Likes Received:
    1,694
    Whoa Nelly!

    I knew the word script would make me sound cleverer than I really am!

    The movement of the file itself is being handled by nice, simple (just like me) batch files. I'm not too clever with PowerShell/VB, I need my hand held.
     

Share This Page