S
Sal
I am using the following macro to delete worksheets in my workbook.
Sub Deleteworksheets()
Sheets("Current Asset").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Current Liability").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Long Term Asset").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Long Term Liability").Select
ActiveWindow.SelectedSheets.Delete
End Sub
The obstacle I am having is that before each sheet deletes I am getting a
message box that reads “Data may exist in the sheet(s) selected for deletion.
To permanently delete the data, press Delete.†I would like to adjust the
macro I have so that it will override this message box and delete the sheets
I have indicated that I want to delete without checking if it is okay. Could
you advise me on how I might do this?
Sub Deleteworksheets()
Sheets("Current Asset").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Current Liability").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Long Term Asset").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Long Term Liability").Select
ActiveWindow.SelectedSheets.Delete
End Sub
The obstacle I am having is that before each sheet deletes I am getting a
message box that reads “Data may exist in the sheet(s) selected for deletion.
To permanently delete the data, press Delete.†I would like to adjust the
macro I have so that it will override this message box and delete the sheets
I have indicated that I want to delete without checking if it is okay. Could
you advise me on how I might do this?