Problems with Excel X SR 1

I never had any real problems with Excel 98. When I moved to OS X and Excel X I was bummed to find that I couldn’t record excel scripts. I always rebooted into System 9, recorded scripts with When I wanted Last year I bought a new PowerBook that came with Panther and recording Excel works with that. So I suppose that OS X 10.4 made some improvements over Jaguar?

Recently I discovered another anomaly while trying update some scripts I hadn’t changed for a while.

I fire up Script Debugger. Create a new script and start recording. Using Cmb-Tab I switch to Excel. Then I hit Cmd-N to create a new workbook. Switch back to Script Debugger and stop recording.

Then script as recorded is:
tell application “Microsoft Excel”
Activate
Create New Workbook
end tell

Looks fine but when I try to run the script I get an error dialog that says
“Microsoft Excel got an error: Can’t continue Create.” The error code is -1708. The new workbook IS created but why the error?

For now my workaround is to open an existing empty Workbook rather creating a new workbook.

I started to switch to Appleworks, but copy my buddy had can’t import some of the more complicated workbooks (I end up with lots of cells with “#error” in them.

Any input appreciated…

I don’t have the same OS or excel version as you, but try the “make new ___ at ___” form.

tell application “Microsoft Excel”
activate
make new workbook at beginning
end tell

Hi Lloyd,

It depends on the application and not the system that allows recording. I’m running Jaguar 10.2.8 and recorded this:

tell application “Microsoft Excel”
Activate
Create New Workbook
end tell

which works when run. I’m using Office X also. You might want to turn off the Project Gallery if it’s on. That can cause trouble sometimes with Microsoft’s ‘Activate’ command.

gl,