Delete sheet code

  • Thread starter Thread starter LiAD
  • Start date Start date
L

LiAD

Hi,

Using the VB recorder I got a code to delete a sheet that is;

Sheets("Machines").Select
ActiveWindow.SelectedSheets.delete

It runs and works. One small issue is that it asks Are you sure you want to
delete this sheet? The user must choose yes before it continues.

Can I disable the need to ask this question - once the user hits the button
it deletes, no questions?

Thanks
LiAD
 
Application.DisplayAlerts = False
Sheets("Machines").Delete
Application.DisplayAlerts = True

If this post helps click Yes
 
Back
Top