Scripting Excel, oh the troubles...
Scripting Excel, oh the troubles...
- Subject: Scripting Excel, oh the troubles...
- From: "Patrick S. Page-McCaw" <email@hidden>
- Date: Fri, 4 Oct 2002 17:30:27 -0700
Sometimes my Excel scripts work and sometimes they don't. Usually
they fail with :
"-1708 Unable to get the Select property of the ... class"
Where the class can be one of many things. Sometimes manually
clicking on Excel and going back to the script solves the trouble,
but not always.
In this case, the error arises from selecting in the Range class. It
comes from a call to
on pasteXLData(theBook, theSheet, theRange)
tell application "Microsoft Excel"
Activate
Select Range theRange of Sheet theSheet of Workbook theBook
Paste
end tell
end pasteXLData
but, a preceding call to copyXLData(...) with the same syntax worked
just fine. The Range is a valid range, the space being pasted to is
empty etc. In fact, in a repeat loop the same handler will work the
first time through but bail (with -1708) the next run through.
Clearly, I don't understand Selection properties. But what am I missing?
Any help greatly appreciated,
Patrick
_______________________________________________
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.