-
Solved: Deleting Worksheets without OKing "Warning Message"
Hi there,
I've got a piece of code that deletes worksheets as follows
[VBA]
For x = 1 To Worksheets.Count - 1
Sheets("Link " & x).Select
ActiveWindow.SelectedSheets.Delete
Next x
[/VBA]
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
-
[VBA]Application.DisplayAlerts = False[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules