View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default getting rid of the "confirm delete" dialogue box when deleting a s

Hi,

I generally recommend you bracket the command that will cause the message to
display as follows

Application.DisplayAlert = False
' the delete sheet line
Application.DisplayAlert = False

the reason is that this suppresses most alert until the subroutine is
complete and if there are any other parts of your code that would generate an
alert if something was wrong you would not see it.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Bernard" wrote:

I have a workbook with thousands of sheets and want to use a macro to delete
selected sheets. Problem is the macro is stopped to "The selected sheet will
be permanently deleted, please confirm delete.............".
Can this dialogue box be turned off permanently?
thanks
Bernard.