Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting Excel being open
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01162978
Message ID:
01163376
Views:
11
>>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
- 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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform