Excel "on key" applescript event

S

sketchturner

Hi Everyone

I can't get the On Key command to work. I have tried many forms. One of them is:

script myscript
display dialog "bla"
end script

tell application "Microsoft Excel"
on key key "+" procedure "myscript"
end tell

I keep getting an error "Microsoft Excel got an error: Can't continue on key".

If you could please point what i am missing, i'll be very grateful.

Regards.
 
B

Bob Greenblatt

Hi Everyone

I can't get the On Key command to work. I have tried many forms. One of them
is:

script myscript
display dialog "bla"
end script

tell application "Microsoft Excel"
on key key "+" procedure "myscript"
end tell

I keep getting an error "Microsoft Excel got an error: Can't continue on key".

If you could please point what i am missing, i'll be very grateful.

Regards.
If you are using Excel 2004 VBA, the syntax is:

Application.Onkey ³+², ³myscript²

Realize that this will run the sub myscript which then needs to call the
applescript. So myscript needs to contain a line which looks like:

Macscript ³fullpathtothecompiledscript²
 
S

sketchturner

Thanks Bob for the fast reply!

Sorry for not being specific enough.
I'm using pure applescript - I'm on Excel 2008.
So there's no VBA i can use.

I'm using the ON KEY command of the Excel 2008 applescript dictionary.

Any suggestions?
 

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