I have set up an Excel automation routine that works very well thanks to the help of other NOLUG posts that I have read. The problem that I am having now, is that if I pass the command to delete a worksheet, it asks me to confirm that deletion. I would like it to just do it without asking. Any way to do this? Here is the code that I am using: Vars - Name DataType Subtype Length xlApplication Automation ‘Microsoft Excel 9.0 Object Library’.Application xlWorkbook Automation ‘Microsoft Excel 9.0 Object Library’.Workbook xlWorkSheet Automation ‘Microsoft Excel 9.0 Object Library’.Worksheet Code - xlWorkbook := xlApplication.Workbooks.Add; xlSheets := xlWorkbook.Worksheets; xlWorkSheet := xlSheets.Item(‘Sheet3’); xlWorkSheet.Delete;
You can supress allerts in Excel by setting the DisplayAlerts property on the Aplication object. xlApplication.DisplayAlerts := FALSE; code… xlApplication.DisplayAlerts := TRUE;