So you think this error is to do with the sizing code and not just some obscure, arcane OLE problem? I can give it a try.
Thanks
>You could use:
>oExcel.ActiveWindow.WindowState = -4137 && xlMaximized
>oExcel.WindowState = -4137 && xlMaximized
>
>If you want the Excel window and active window to be expanded.
>
>
>>It never rains but it pours. As you may have noticed from recent post, I'm pretty new to this Excel automation lark. However, I do have some code that's been working fine for me. I've built my exe and it works fine as well as from VFP -on MY m/c
>>
>>Now when my users invoke the exe and run this code:
>>
>>
>>EXPORT TO &lcFilePath TYPE XL5
>>loExcel = CREATEOBJECT([Excel.Application])
>>With loExcel
>> .Workbooks.Open( lcFilePath)
>> If not thisform.lCustom
>> With .ActiveWindow
>> .DisplayZeros = .F.
>> .Width = 1124
>> .Height = 645
>> EndWith
>> With .ActiveSheet
>> ...
>>
>>
>>my error routine reports:
>>
>>OLE dispatch error 1479 at line 30 of ...., line of code = .
>>
>>The actual line is:
>>
>> .Width = 1124
>>
>>but the routine says "."
>>
>>What gives here?????
>>
>>Of course Help tells me zip.
>>
>>I suspected that it might be because Excel was already open on their m/cs, so closed it, but no difference.
>>
>>'ppreciate it.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.