Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

Use a macro. Copy the macro below into your personal.xls file, and then assign it to a custom
commandbar button.

HTH,
Bernie
MS Excel MVP

Sub KillSheet()
Application.DisplayAlerts = False
On Error GoTo NoWorkbooks
If ActiveSheet.Type = 3 Then
ActiveChart.Delete
Else
If ActiveWindow.SelectedSheets.Count < _
ActiveWorkbook.Worksheets.Count Then
ActiveWindow.SelectedSheets.Delete
Else
If MsgBox("That's the last sheet." & Chr(10) & _
"Do you want to close the file without saving?", _
vbYesNo) = vbYes Then
ActiveWorkbook.Close False
End If
End If
End If
NoWorkbooks:
Application.DisplayAlerts = True
End Sub


"andriil" wrote in message
...
Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Assign to a button or shortcut key-combo.


Gord Dibben Excel MVP

On Fri, 16 Dec 2005 05:37:03 -0800, "andriil"
wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

Mr. Deitrick,
thank you very much for your answer.
Could you, please, also tell me if there is anything like "deleteworksheet"
event in excel, so that I could tie the macro to this event and delete the
sheets normally, but without the alert?
Thank you.
Andrii.

"Bernie Deitrick" wrote:

Use a macro. Copy the macro below into your personal.xls file, and then assign it to a custom
commandbar button.

HTH,
Bernie
MS Excel MVP

Sub KillSheet()
Application.DisplayAlerts = False
On Error GoTo NoWorkbooks
If ActiveSheet.Type = 3 Then
ActiveChart.Delete
Else
If ActiveWindow.SelectedSheets.Count < _
ActiveWorkbook.Worksheets.Count Then
ActiveWindow.SelectedSheets.Delete
Else
If MsgBox("That's the last sheet." & Chr(10) & _
"Do you want to close the file without saving?", _
vbYesNo) = vbYes Then
ActiveWorkbook.Close False
End If
End If
End If
NoWorkbooks:
Application.DisplayAlerts = True
End Sub


"andriil" wrote in message
...
Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?






  #6   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

Mr. Dibben,
thank you for the macro.
Is there any way to avoid using some custom buttons? I used to tie my macros
to workbook, worksheet or application events, but I can't find anything like
"worksheet_delete" event or something... Does anything like this exist?
Thanks again.
Andrii.

"Gord Dibben" wrote:

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Assign to a button or shortcut key-combo.


Gord Dibben Excel MVP

On Fri, 16 Dec 2005 05:37:03 -0800, "andriil"
wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


  #7   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

Mr. Peterson,
Thank you for your answer.
I'm afraid, I have the 2003 and I still see the alert...
Maybe it's optional, and I can disable it?
Thanks
Andrii.

"Dave Peterson" wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

Not an option.

Maybe you have something that changes the worksheet -- or are using book.xlt or
sheet.xlt that does something to make it look to excel like the worksheet was
used.

andriil wrote:

Mr. Peterson,
Thank you for your answer.
I'm afraid, I have the 2003 and I still see the alert...
Maybe it's optional, and I can disable it?
Thanks
Andrii.

"Dave Peterson" wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

It was used. But I want to delete it. Without alerts. Thank you, sorry for
bothering.

"Dave Peterson" wrote:

Not an option.

Maybe you have something that changes the worksheet -- or are using book.xlt or
sheet.xlt that does something to make it look to excel like the worksheet was
used.

andriil wrote:

Mr. Peterson,
Thank you for your answer.
I'm afraid, I have the 2003 and I still see the alert...
Maybe it's optional, and I can disable it?
Thanks
Andrii.

"Dave Peterson" wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?

--

Dave Peterson


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.


Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?



  #11   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson
  #12   Report Post  
Posted to microsoft.public.excel.misc
andriil
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

yes

"Dave Peterson" wrote:

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson

  #13   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

Andrii

You could assign the macro to the EditDelete Sheet menu item through
ToolsCustomize.

You could also assign it to the Delete Sheet on the sheet tab right-click menu
item.

This would be more complex and would require changing the right-click
menu("Ply")

Private Sub Workbook_Open()
Application.CommandBars("Ply").Controls("Delete"). Delete
With Application.CommandBars("Ply").Controls.Add(tempor ary:=True)
.BeginGroup = True
.Caption = "Delete Sheet no Warning"
.OnAction = "MyMacros.xla" & "!SheetDelete"
End With
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Ply").Reset
End Sub


Gord

On Fri, 16 Dec 2005 09:19:02 -0800, "andriil"
wrote:

Mr. Dibben,
thank you for the macro.
Is there any way to avoid using some custom buttons? I used to tie my macros
to workbook, worksheet or application events, but I can't find anything like
"worksheet_delete" event or something... Does anything like this exist?
Thanks again.
Andrii.

"Gord Dibben" wrote:

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Assign to a button or shortcut key-combo.


Gord Dibben Excel MVP

On Fri, 16 Dec 2005 05:37:03 -0800, "andriil"
wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


  #14   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

I don't.

andriil wrote:

yes

"Dave Peterson" wrote:

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson


--

Dave Peterson
  #15   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)

And you're using xl2003?

andriil wrote:

yes

"Dave Peterson" wrote:

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson


--

Dave Peterson


  #16   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

No, I do not get a warning when opening in safe mode and delete a sheet from
the default Book1.

If I then open an existing workbook, I get the warning when deleting a sheet
since it does have data in it.

Also if I start Excel normally and File...NewBlank Workbook I don't get the
warning when deleting a sheet from that workbook.

Any existing workbook or new from BOOK.XLT gives the warning.

Interesting. Never knew this thing.


Gord

On Fri, 16 Dec 2005 12:54:46 -0600, Dave Peterson
wrote:

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?

  #17   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How can I disable system alerts (deleting a sheet for example)?

My book.xlt and my sheet.xlt templates have some page layout stuff and
header/footer stuff. Maybe xl2003 is smart enough to notice that it isn't a
"blank canvas".

"tabula rasa" was what my English teachers called it. (First time in 30 years I
could use that!! <vbg.)



Gord Dibben wrote:

No, I do not get a warning when opening in safe mode and delete a sheet from
the default Book1.

If I then open an existing workbook, I get the warning when deleting a sheet
since it does have data in it.

Also if I start Excel normally and File...NewBlank Workbook I don't get the
warning when deleting a sheet from that workbook.

Any existing workbook or new from BOOK.XLT gives the warning.

Interesting. Never knew this thing.

Gord

On Fri, 16 Dec 2005 12:54:46 -0600, Dave Peterson
wrote:

Try opening xl in safe mode.

Do you get the prompt then?

Gord Dibben wrote:

Dave

The warning message appears in my 2002 and 2003 versions.

Either right-click and delete or delete sheet from toolbar or Insert menu.

Maybe you have customized your "Delete Sheet" button or menu item.

Gord

On Fri, 16 Dec 2005 10:22:33 -0600, Dave Peterson
wrote:

You could use a macro to delete the sheet.

But I would bet it would take as long to run the macro as it would to answer the
prompt.

Another option is to upgrade your version of excel. xl2003 doesn't have the
prompt anymore. (Not sure when it was removed, though...xl2002???).

andriil wrote:

Every time delete a sheet, I get a system alert saying "Data may exist in the
sheet(s) selected for deletion. To permanently delete the data, press
Delete". It's a bit annoying when you have to delete many sheets and you
don't want to select multiple sheets. Is there any possibility to disable
this alert?


--

Dave Peterson
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
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM
Deleting every-other row in a spread sheet smintey Excel Discussion (Misc queries) 5 December 8th 04 05:08 PM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 02:41 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"