PDA

View Full Version : Solved: Deleting Worksheets without OKing "Warning Message"



maxhayden
05-27-2009, 07:39 AM
Hi there,

I've got a piece of code that deletes worksheets as follows




For x = 1 To Worksheets.Count - 1


Sheets("Link " & x).Select
ActiveWindow.SelectedSheets.Delete

Next x




When this deletes my sheets, it comes up with warning messages for each sheets: "Data may exist in the sheet(s) selected for....."

Is there a way of bypassing this?

Thanks in advance,

Max

mdmackillop
05-27-2009, 08:04 AM
Application.DisplayAlerts = False

maxhayden
05-27-2009, 08:06 AM
Thanks!