Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel automation 101
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00543842
Message ID:
00544554
Views:
14
Hi Andrew,
That was it. I am so embarassed! I can't believe I did that. Thank you for picking that up.

Regards,
Robin
(paying extremely close attention to objects and their properties from now on...)

>OK - the Sheets collection doesn't have a Selection property.
>
>Change the line in bold below to
>
>oEx.Selection.Insert(0xFFFFEFE7) && with/without #INCLUDE and/or #DEFINE
>
>
>and it works for me.
>
>Cheers,
>
>Andrew
>
>>Hi Andrew,
>>
>>I'm still getting this program error that I can't make head or tail of. In order to test it, I created the following little prg:
>>

>>oEx = CREATEOBJECT("Excel.Application")
>>* -- The file I'm working with
>>oEx.Workbooks.Open("c:\My Documents\hairtrek\hairtrek.xls") && it exists
>>
>>* -- I tried one of the following and then the other, both and then neither -
>>* -- unclear on the concept, perhaps??
>>#INCLUDE xl97cons.h && found it - it's in the path
>>* #DEFINE xlDown -4121 && this was in the code
>>oEx.Rows("5:5").Select && works
>>
>>* -- Tried all of the following in succession, all of which stuffed up, with
>>* -- runtime error described below
>>
>>oEx.Sheets.Selection.Insert(0xFFFFEFE7) && with/without #INCLUDE and/or #DEFINE

--snipped--
>>The error is the following:
>>OLE error code 0x80020006: Unknown name
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform