Execution Error with Excel script
Execution Error with Excel script
- Subject: Execution Error with Excel script
- From: "Rebecca Felts" <email@hidden>
- Date: Thu, 8 Nov 2001 11:38:03 -0600
I have the script below which saves the active workbook. If a file of that
same name already exists, excel asks if user wants to replace it. If the
user answers "Yes", this script executes fine and returns true. However, if
the user answers "No" or "Cancel", the script throws an Execution Error:
"Microsoft Excel got an error: Unable to get the SaveAs property of the
Workbook class". Can I force the save and not let excel ask? Can I rewrite
the script to handle this error? I have tried "Save ActiveWorkbook in
"Macintosh HD:Some Directory:FileName.xls" As xlNormal" with the same
results.
tell application "Microsoft Excel"
Activate
Save ActiveWorkbook
end tell
Thanks for any ideas,
Rebecca Felts
Software Engineer
Team Labs Corporation
www.teamlabs.com