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:
01163380
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
>>>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


From VBA Help:
The width of the window. Use the UsableWidth property to determine the maximum size for the window. You cannot set this property if the window is maximized or minimized. Use the WindowState property to determine the window state. Read/write Double.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform