How-To suppress a warning dialog

J

James

Dear Experts

I am trying to delete all but one worksheetsheet
named "products" in active workbook. When ever I try
running the macro a Warning pops up asking All content of
the sheet would be lost, do you wish to continue (or
something like this)
Is there a way to prevent that from poping up.
Please advise

I use xl2002 vba on Win 2k

Thanks
James
 
F

Frank Kabel

Hi
try
application.displayalerts=false
'your code
application.displayalerts=true
 
K

kkknie

Insert

Application.DisplayAlerts = False

before the deletes and then

Application.DisplayAlerts = True

after.
 
Top