ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   custom event (https://www.excelbanter.com/excel-discussion-misc-queries/60818-custom-event.html)

andriil

custom event
 
Is there any possibility to create a custom event in VBA (excel)?
I'm trying to block a prompt that is shown when I delete a sheet with data
on it. There's no such option in "Options". I could do it via macro, but
there seems to be no "Worksheet_Delete" event or something. May be there is
some possibility to create a custom event?
Thanks in advance for your help!

Don Guillett

custom event
 
try this. true will automatically come back after the macro.

Sub delsheet()
Application.DisplayAlerts = False
ActiveSheet.Delete
End Sub

--
Don Guillett
SalesAid Software

"andriil" wrote in message
...
Is there any possibility to create a custom event in VBA (excel)?
I'm trying to block a prompt that is shown when I delete a sheet with data
on it. There's no such option in "Options". I could do it via macro, but
there seems to be no "Worksheet_Delete" event or something. May be there
is
some possibility to create a custom event?
Thanks in advance for your help!




andriil

custom event
 
yes, it deletes a sheet. but I want to delet it in a normal way, but without
alerts.
if I rightclick the sheet and select "delete", an alert appears.
Is there any "Deletesheet" event that could intercept it?
Is there a way to create non-standard, custom alerts?
Thank you very much for your help!

"Don Guillett" wrote:

try this. true will automatically come back after the macro.

Sub delsheet()
Application.DisplayAlerts = False
ActiveSheet.Delete
End Sub

--
Don Guillett
SalesAid Software

"andriil" wrote in message
...
Is there any possibility to create a custom event in VBA (excel)?
I'm trying to block a prompt that is shown when I delete a sheet with data
on it. There's no such option in "Options". I could do it via macro, but
there seems to be no "Worksheet_Delete" event or something. May be there
is
some possibility to create a custom event?
Thanks in advance for your help!





Gord Dibben

custom event
 
Go back to your original posting and see some methods I posted.


Gord Dibben Excel MVP

On Fri, 16 Dec 2005 11:36:03 -0800, "andriil"
wrote:

Is there any possibility to create a custom event in VBA (excel)?
I'm trying to block a prompt that is shown when I delete a sheet with data
on it. There's no such option in "Options". I could do it via macro, but
there seems to be no "Worksheet_Delete" event or something. May be there is
some possibility to create a custom event?
Thanks in advance for your help!



All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com