Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to get the Select property of the Worksheet class
Message
From
25/07/2006 16:57:06
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Unable to get the Select property of the Worksheet class
Miscellaneous
Thread ID:
01139944
Message ID:
01139944
Views:
152
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
Next
Reply
Map
View

Click here to load this message in the networking platform