Daily tips for using Microsoft Excel.

Tuesday, October 23, 2001

Charlie asks Is there a way in VBA to remove a worksheet which will bypass the "The selected sheets will be permanently deleted. Click OK" prompt"

This particular message is one that can be suppressed by using the Application.DisplayAlerts property. Use the following code:

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