Re: Applescript from Excel button
Re: Applescript from Excel button
- Subject: Re: Applescript from Excel button
- From: David Wignall <email@hidden>
- Date: Fri, 30 Apr 2004 21:15:01 +1200
on 29/04/2004 6:24 PM, David Wignall at email@hidden wrote:
>
on 29/04/2004 9:04 AM, Tom Bilski at email@hidden wrote:
>
>
<snip>
>
>
> In this particular instance I have a macro that is
>
> launched from a button. The macro line is simply...
>
>
>
> Sub ExportToUnix()
>
> MacScript ("Manufacturing:Scripts:ExportToUnix")
>
> End ExportToUnix
>
>
>
> I have been using this macro and script (and many like it) for several years
>
> without any problems.
>
> I ran into a problem when I updated to OSX 10.3.3. Now, when I try to run
>
> this macro I get one of two problems. Either I get a 3Microsoft Visual
>
> Basic2 dialog box that states 3Run-time error 59: Invalid procedure or
>
> argument... Or the script executes and then I get the same message.
>
> Is anyone aware of a change in AppleScript that would cause such a problem?
>
> Any idea what I can try to get around it?
>
>
Can't reproduce it here, OS X 10.3.3, XL 10.1.5. Is the last line of your
>
VBA macro really 'End ExportToUnix'? That doesn't compile. What happens if
>
you run the script directly?
on 30/04/2004 1:38 AM, Tom Bilski at email@hidden wrote:
>
I am running OS X 10.3.3, XL 10.1.5. The last line is actually 3End Sub2 ,
>
sorry for the typo. The script runs fine when it is run directly?
My inference from that is that VBA is erroring, rather than AppleScript. I
just can't see how :-/ Is the path to the script still correct?
If you wrap the ExportToUnix script inside a try/end try and run it from VBA
then if the script indeed errors, the error is not passed back to VBA. At
least not OMM. This could be a useful test to run. If it is in fact VBA then
you could try removing the parentheses from around the MacScript argument.
Makes no difference here but hey, it's VBA.
Have you tried a new macro that calls the same script?
--
Dave
_______________________________________________
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.