• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Excel 2004 macros
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Scripting Excel 2004 macros
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Itunes paste album art.
  • Next by Date: Quark 6.5 Contact Sheet?
  • Previous by thread: Re: Moving Terminal.app windows
  • Next by thread: Re: Scripting Excel 2004 macros
  • Index(es):
    • Date
    • Thread