Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting users some control
Message
From
01/02/2002 15:46:17
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00614042
Message ID:
00614265
Views:
28
Nadya,

This will work. The only problem is that you have no control over Excel and what the user does. Basically, the PrintPreview() method is like a modal form. VFP doesn't process the next line until the user closes the preview. That's why I ask the user whether to save the file or not. If the user decides not to save the file, Excel is closed and the file is deleted from disk. If the s/he answers < Yes > then the Excel file is displayed in normal mode.

If you simply display the Excel file then you have no (easy) control. If the user closes the Excel file, Excel asks if the user wants to save the file. If the user choses < No >, the file remains on disk. I find this rather confusing for the user.

I hope this makes sense to you?

>>Nadya,
>>
>>If you comment out the oXLS.ActiveWindow.SelectedSheets.PrintPreview line, it should simply display the sheet (when the oXls.visible = .t. executes).
>>
>>>
>>>Ok, another question: Is it possible to turn it to Normal excel view not the Preview?
>>>
>
>Thanks, Steve. I guess, I'll add another mode to this program.
>
>It didn't work. Immediatelly pops up a question "Do you want to save?", but Excel doesn't become visible
>
>Ok, made it work by just making it visible and not executing the rest of the code.
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform