Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to work around VFP Excel Page Fault?
Message
From
27/07/1999 18:05:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00246455
Message ID:
00246892
Views:
15
>Cetin:
>I gave it a try, and still Page Fault. Maybe its due to switches in the "Auto_start" macro. I tried something, and was able to get around page fault:
>Originally:
>oExcel=CREATEOBJECT('Excel.Application')
>oExcel.Application.WorkBooks.WorkSheet.Open('MyXLS.xls')
>oExcel.Application.Run("Auto_Open")
>oExcel.Visible=.t.
>* With this sequence, clicking the WorkSheet (X)Close caused GPF
>
>Current WorkAround:
>oExcel=CREATEOBJECT('Excel.Application')
>oExcel.Application.WorkBooks.WorkSheet.Open('MyXLS.xls')
>oExcel.Visible=.t. && Note the visible is before the "Auto_Open" macro
>oExcel.Application.Run("Auto_Open") && The user sees a sluggish macro execute
>* With this sequence, clicking the WorkSheet (X)Close did not cause GPF
>
>:Questions
>1) Why doesn't .Run("Auto_Open") execute with the .Open("MyXLS.xls")?
>2) Does re-sequencing of Visible say anything about the macro that may help?
>3) Can I disable the (X)Close button on the WorkSheet?
>4) Can I disable the (-) Minimize and Maximize Buttons on Excel's main?
>
>Also, I note that I used the form:
> oExcel.WorkBooks.Open('MyXLS.xls') in my original message
>rather than:
> oExcel.Application.WorkBooks.WorkSheet.Open('MyXLS.xls')
>* Is there a difference?
>
>Since I'm new to VFP Excel Automation, I don't have a solid understanding of whats really going on. An automation newbie!
>Thanks
>Terry
When it's ActiveX I'm a newbie forever :) I also use oExcel.WorkBooks.Open('MyXLS.xls'). run("auto_open") is calling a macro there. Macro sheet should be available for a macro to run (Excel says:). I never use macros so I don't have an idea if it's related to visible =.t. + macrocontents. Excel also says Auto_open is included for backward compatability, use open event instead. Also there is RunAutoMacros(xlAutoOpen).
I couldn't find something to like closable =.f., maxbutton, minbutton.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform