Deleting a worksheet during a macro

bam

New Member
Joined
Dec 19, 2002
Messages
12
I have a macro that moves a Calculations worksheet into a file for calculating rates. Once the rates are calculated and moved to the Quote Sheet, I would like to delete the Calculations worksheet from the file. When I record the macro, Excel requires the user to confirm deleting the worksheet by pressing the "delete" or "cancel" button in the Excel Popup window. How can I set up the macro so that the macro automatically deletes the worksheet without the user having to press the "delete" button?
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
L

Legacy 51064

Guest
' To get rid of temp sheet
Application.DisplayAlerts = False
Sheets(Sheet1).Delete
Application.DisplayAlerts = True
 

Watch MrExcel Video

Forum statistics

Threads
1,118,069
Messages
5,570,008
Members
412,304
Latest member
citrus
Top