Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suppressing Excel warning message via OLE automation
Message
From
15/01/2004 08:03:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00867005
Message ID:
00867043
Views:
20
>In the following sample code, the last line of Code will give a warning in the Excel User Interface, as I am about to delete a worksheet with some dummy temp data. I want to suppress this warning. ie I want to do something like a VFP command: SET SAFETY OFF so that the sheet gets deleted so that the rest of my code will execute without user intervention.
>
>ox = CREATEOBJECT("Excel.application")
>ox.Visible=.t.
>ox.Workbooks.Add
>ox.ActiveSheet.Cells(1,1) = "test"
>ox.ActiveSheet.Delete()

ox.DisplayAlerts = .f.
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
Reply
Map
View

Click here to load this message in the networking platform