Scripting Excel 2004 macros
Scripting Excel 2004 macros
- Subject: Scripting Excel 2004 macros
- From: Larry McMunn <email@hidden>
- Date: Wed, 2 Feb 2005 21:14:47 -0500
I need to call several Excel Macros at different times in a script.
if we use what we think is the correct syntax, the macro runs two
times.
Example:
tell application "Excel_2004"
activate
run VB macro "ExLio_Macros_E.xls!TestMacroToo()" --runs twice
--run VB macro "ExLio_Macros_E.xls!TestMacroToo" --only runs once
end tell
The test Macro simply beeps and then displays a message window with
the string "This message is from the macro within Excel."
I was under the impression that the call for the macro needed the
complete name including to the workbook containing it as well as the
complete Macro name including the parens on the end. This has me
wondering why the version without the closing parens works and runs
once, but the version with the complete name runs twice. Any ideas or
suggestions out there?
--
Happy Automation! :-)
Larry McMunn
President
McMunn Associates, Inc.
Collingswood, NJ
(856) 858-3440
---------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden