Visual Basic for Applications (ExCel)

I'm a novice at macros and need some help. I need a marco that deletes a sheet in an active excel workbook. I recorded a macro, but it requires user intervention (I must click on "delete" in the dialog box that pops up). Recording the macro does not record my clicking in the dialog box. How can I delete the sheet without user intervention

Answer this question

Visual Basic for Applications (ExCel)

  • zhaorui

    Application.DisplayAlerts = False
    Worksheets("Sheet3").Delete
    Application.DisplayAlerts = True


  • Visual Basic for Applications (ExCel)