PDA

View Full Version : [SOLVED] Delete sheet without prompting



ilyaskazi
04-25-2005, 06:05 AM
i want to delete sheet through vba. but it should not prompt me for deleting.

Killian
04-25-2005, 06:48 AM
Sub DeleteSheet()
'switch off application alerts
Application.DisplayAlerts = False
ActiveSheet.Delete
'don't forget to switch them back on when you're done
Application.DisplayAlerts = True
End Sub

JKwan
04-25-2005, 06:50 AM
Turn off your alerts by using


Application.DisplayAlerts = False

When done, turn it back on.