Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel error
Message
From
24/08/2000 15:02:59
 
 
To
24/08/2000 14:51:30
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00408726
Message ID:
00408945
Views:
13
Try something like the following:

oExcel.Sheets("Hoja1").Select <- this line pass OK
oExcel.selection.Range("C25").Select <- classic OLE unknown COM state error

or

oExcel.activesheet.Range("C25").Select <- classic OLE unknown COM state error

I suggest this, because, as another Universal thread member pointed out already, when you use 'getObject' you're dealing with a workbook object, not the excel application object. The workbook object does not have a range property, so when you say oExcel.range...etc, Excel doesn't recognize that property. However, worksheet is a property of a workbook, so if you do yourObject.activesheet.range(), you can access the range property THROUGH the worksheet.

Is that at all clear, or was I just rambling again? :^)
Paul A. Busbey
Victoria Insurance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform