Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto Update Excel WorkBook Alert
Message
 
To
14/01/2010 05:12:14
General information
Forum:
Visual FoxPro
Category:
ActiveVFP
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01443899
Message ID:
01443900
Views:
38
>Hi,
>
>I have a program from VFP9 to Excel Automation. That Excel file contains few sheets and there is some formulas available for
>calculation.
>
>So my problem is every time its asking the below message
>
>"The Workbook contains links to other datasources
>To update all linked information, click Yes.
>To keep the existing information, click No."
>
>Also With my program, I gave Display alerts as false. So how to make it as AutoUpdate ?
>
>My codes, like the below
>
>loExcel = Createobject("Excel.Application")
>loExcel.workbooks.Open('&Pay_Sheet')
>loExcel.Cells.Select()
>loExcel.ReferenceStyle= -4150
>loExcel.Displayalerts=.F.
>loExcel.caption="EMPLOYEES PAYSLIP"
>
>With loExcel.ActiveWorkbook.ActiveSheet
>...blah...blah....blah...
>
>Thanks for the Ideas....

Move the DisplayAlerts immediately after CREATEOBJECT()
loExcel = Createobject("Excel.Application")

loExcel.Displayalerts=.F.

loExcel.workbooks.Open('&Pay_Sheet')
loExcel.Cells.Select()
loExcel.ReferenceStyle= -4150 
loExcel.caption="EMPLOYEES PAYSLIP"
But I'm not sure if the links will be updated automatically.
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