General information
Category:
COM/DCOM and OLE Automation
Title:
Suppressing Excel warning message via OLE automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only