Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suppressing Excel warning message via OLE automation
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Suppressing Excel warning message via OLE automation
Miscellaneous
Thread ID:
00867005
Message ID:
00867005
Views:
67
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()
Next
Reply
Map
View

Click here to load this message in the networking platform