Schedule macro

Hi, I am new to Automise as of this morning, I would like to know how to schedule

open excel document,

wait 10min,

run excel macro

close excel

Thanks

Hi David,

Thanks for your post. I've attached a very simple Automise project which uses GUI Automation to achieve these goals, along with a sample Excel 2007 workbook.

It does six things

1) Prompts for an excel file and a macro name. The macro name needs to match the name in the "Macros" dialog when you open the project. You can disable this action and just set the defaults (under Tools -> Edit Variable), in order to hard-code the values.

2) Opens the Excel file.

3) Pauses for 10 seconds.

4) Enables Macros in the project (For Excel 2007 only.)

5) Runs the named macro and waits for it to complete.

6) Closes the Excel document.

 

You didn't say what version of Excel you were using. The project I attached was created with Excel 2007. You will need to make some minor modifications to get this project to work in an earlier version of Excel.

 

If you are using an earlier version of Excel, you probably have to do the following:

1. Disable the action group named "Enable macros in this project" by clicking on the Enabled button in the main action list. These steps are only required for Excel 2007, which disables unsigned macros by default.

2. You may need to fix the part of the action which tells Automise where to find the "Macro Name" field in the macro dialog. To fix this, first manually open Excel and show the Macros dialog (Alt-F8.) Then open the "Send Keyboard Input" action which is the second child action under the "Run Macro" action group. Click the button "Click here to find a control in a running application", then Control-Click on the "Macro name" text field in the Excel dialog. Repeat for the next "Send Keyboard" action (the third child of "Run Macro".)

 

You will probably also want to change the initial delay from 10 seconds to 10 minutes (10 minutes is 600000 milliseconds.) And also change the second delay to reflect how long the Macro is going to run for.

Please let us know how you go. If you're not using Excel 2007, and the project doesn't work for you, then please let me know what version of Excel you are running and I'll redo the project.

 

Regards,

Angus

Automise Excel 2007 Example Project.zip (14.739 KB)

Thanks for your help.

I am using excel 2003 and Automise 1. will see if renaming the file ext will allow me to open it in v1 not v2.

Thanks

David

Hi David,

Thanks for replying. The GUI Automation functionality that the project relies upon is new in Automise 2, so it will not work in Automise 1. Sorry.

Regards,

Angus