>>>Boris, or anyone, can you tell me why I now get an OLE dispatch (un-detailed) error with the below .width and ,Height commands? .DisplayZeros = .F. - no problem, or the commands after that.
>>>They were working fine before but now in a loop as I do this 2 times, once for each generated w/s which I later combine in one book, as per Naomi's supplied code.
>>>
>>>With loExcel
>>> .Workbooks.Open( lcTempXLS)
>>> With .ActiveWindow
>>> .DisplayZeros = .F.
>>> .Width = 2000
>>> .Height = 645
>>> EndWith
>>> With .ActiveSheet
>>> .Columns( 2).ColumnWidth = 24
>>> .Columns( 3).ColumnWidth = 6
>>> ... etc
>>> EndWith
>>> ...
>>>EndWith
>>>
>>>
>>>Cheers
>>>
>>>Terry
>>
>>Width = 2000??? WOW what a monitor!
>>Why you set Heigth and Width values of the window?
>>If you want window to be maximised just use .WindowState = 2
>
>OOps! I don't understand - I wasn't looking at the values. Either they were commented out orig. or somehow the orig. values I used have been changed :-)
>
>Anyway, I changed width to 200 (don't know what units this is in!) but still get the error
>
>Thanks
I think the property is called DisplayAlerts. Try to comment Width and Height completely for now.
If it's not broken, fix it until it is.
My Blog