How do I turn off the Delete Confirm in Excel/VBA

T

Terry Lawson

I have a workbook which contains only VBA which acts on another workbook and
produces up to 20 working worksheets which I cancel with Sheet(X).Delete, how
do I prevent up to 20 msgboxes asking me to confirm that I want to delete
 
F

Frank Kabel

Hi
application.displayalerts=false
'delete code
application.displayalerts=true

--
Regards
Frank Kabel
Frankfurt, Germany

Terry Lawson said:
I have a workbook which contains only VBA which acts on another workbook and
produces up to 20 working worksheets which I cancel with Sheet(X).Delete, how
do I prevent up to 20 msgboxes asking me to confirm that I want to
delete
 
Top