Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unable to get the Select property of the Worksheet class
Message
De
25/07/2006 16:57:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Unable to get the Select property of the Worksheet class
Divers
Thread ID:
01139944
Message ID:
01139944
Vues:
153
I have a problem with Excel automation where I get the error "Unable to get the Select property of the Worksheet class".

I have an Excel chart that I have saved into a file. I then do the following:
Create Cursor csrGraph ( OleGraph G )
Append Blank In csrGraph
Append General OleGraph From ( lcFileName ) Class "Excel.Chart"

This.ograph.ControlSource = "csrGraph.oleGraph"
This.ograph.Object.Sheets("Chartdata").Select
More code follows that makes changes to the data in the cells, hides some columns, etc.

The problem: This works for me and about half of my users. The other half get the error message noted above on the last line (.Select). Any ideas why this is failing?

P.S. -- I created the Excel chart originally using Excel automation. This seemed quite slow. So, I learned that the code I had borrowed worked by saving the excel chart and then inserting it using the "Append General" statement, and I also learned that I could modify some (but not all) of the properties by using This.oGraph.Object (all this from "1001 Things"). This technique works very fast for those cases where the graph is re-created based on user selection criteria, and would hope not to have to abandon it.
Jim Nelson
Newbury Park, CA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform