Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default getting rid of the "confirm delete" dialogue box when deleting a s

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default getting rid of the "confirm delete" dialogue box when deleting a s


application.displayalerts=false
code
reset to true
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Bernard" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default getting rid of the "confirm delete" dialogue box when deleting

Thanks for that. However it responds with "Run time Error '438'
Object doesn't support this property or method"

I am using Excel 2000.
Bernard.


"Shane Devenshire" wrote:

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.

  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default getting rid of the "confirm delete" dialogue box when deleting

Shane missed the syntax. Note the "s"

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Thu, 2 Jul 2009 23:42:01 -0700, Bernard
wrote:

Thanks for that. However it responds with "Run time Error '438'
Object doesn't support this property or method"

I am using Excel 2000.
Bernard.


"Shane Devenshire" wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to confirm entry in Col "C" is valid for data in Col "A" VAPCMD Excel Discussion (Misc queries) 2 January 2nd 09 07:58 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
cancel the "Getting Started" Dialogue Box when I open XL/Word jazzy1 Setting up and Configuration of Excel 1 May 2nd 08 12:53 AM
"Save In" dialog (dialogue) issue Dan Levin Excel Discussion (Misc queries) 0 April 1st 08 06:20 PM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"