Excel vX and applescript broken?

F

fred weber

The following used to work until I upgraded to office vx:

Tell application "Microsoft Excel"
Activate Window "winName"
blah - blah - blah
End Tell

Now, the active window doesn't change, and the rest of the
script uses whatever window happens to be the current
active window.

It appears to me that "Activate Window 'winName'" no
longer works correctly. Has anyone else seen thisproblem,
and is there a fix for it?
 
J

J.E. McGimpsey

fred weber said:
The following used to work until I upgraded to office vx:

Tell application "Microsoft Excel"
Activate Window "winName"
blah - blah - blah
End Tell

Now, the active window doesn't change, and the rest of the
script uses whatever window happens to be the current
active window.

It appears to me that "Activate Window 'winName'" no
longer works correctly. Has anyone else seen thisproblem,
and is there a fix for it?

Frankly, I can't say whether it has ever worked in XLv.X, since I
never use Activate, though I have a number of XL applescripts (I
always use the objects directly). I've asked Paul Berkowitz if he
knows, since he's developed some XLv.X applescripts

To work around the problem, if not to fix it, you can address the
objects directly:

tell application "Microsoft Excel"
set myBook to Workbook "Workbook2.xls"
set myRange to Range "R10C2" of Worksheet "Sheet2" of myBook
set myVal to Value of myRange
-- blah - blah - blah
end tell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top