• 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
Re: AppleScript and Microsoft Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and Microsoft Excel


  • Subject: Re: AppleScript and Microsoft Excel
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 30 Aug 2002 08:24:21 -0700

On 8/30/02 7:36 AM, "Doug McNutt" <email@hidden> wrote:

> It's fairly easy to set up a macro in Visual Basic for Applications (VBA) that
> will run only as a workbook is opened. Look for Workbook_Open in the VBA help
> files. But, after saying that, I don't know how to ask VBA to call an
> AppleScript. VBA can display a "form" requesting information and of course it
> can populate cells.

The 'Macscript' command in VBA can call any AppleScript, either by filepath
- if it's an applet - or simply embedding an actual script. The latter
method can get a bit complicated since you need to do two things: every line
ending needs to be " & VbCr & " ( or & Chr(13) & ) . To make it look more a
normal script on separate line, that would be

"A line of script here" & VbCr & _
"Another line here" & VbCr & _

etc. You get used to it. Then literal quotes get complicated, since you need
not only AS's back-slash escape, but VBA's doubling of every quote:

"an internal \""quote\"" here"

Using variables in the middle of these things can get really mind-boggling
working out the quoting. I've had 5 at a time """""".


--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AppleScript and Microsoft Excel
      • From: David Wignall <email@hidden>
References: 
 >Re: AppleScript and Microsoft Excel (From: Doug McNutt <email@hidden>)

  • Prev by Date: newbie text questions
  • Next by Date: Re: Accessing Dictionary Contents (was: Re: AppleScript Try)
  • Previous by thread: Re: AppleScript and Microsoft Excel
  • Next by thread: Re: AppleScript and Microsoft Excel
  • Index(es):
    • Date
    • Thread