• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Excel, oh the troubles...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Scripting Excel, oh the troubles...
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Xpress template to document
  • Next by Date: Mail and the confirm dialog - Attn Cricket
  • Previous by thread: Re: What are "Finder.out" and SIOUX?
  • Next by thread: Re: Scripting Excel, oh the troubles...
  • Index(es):
    • Date
    • Thread