Delete Sheet in Excel automation

Hello,

I'm trying to delete sheets in Excel using automation. I tried to use the .DELETE method of the Worksheet object but it does nothing. If I use it with Excel visible it opens a confirmation dialog ('This sheet might contain data', etc). Would anyone have ran into this problem?

Thanks.

Stephan

Comments

  • The .Application automation has a property "DisplayAlerts". So xlApplication.DisplayAlerts := FALSE; may be worth a try?
  • Hi Stephan,

    did you solve your problem with .delete?

    Regards
    Navsyst