ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Events are not disabled (https://www.excelbanter.com/excel-programming/400675-events-not-disabled.html)

Greg

Events are not disabled
 
hi,

I'm deleting a sheet w/ data via code and the following is not working??

Application.EnableEvents = False
wks.Delete
Application.EnableEvents = True

Thank you for your suggestions
--
______
Regards,
Greg

Don Guillett

Events are not disabled
 
You give almost no information but perhaps you want
application.displayalerts=false


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Greg" wrote in message
...
hi,

I'm deleting a sheet w/ data via code and the following is not working??

Application.EnableEvents = False
wks.Delete
Application.EnableEvents = True

Thank you for your suggestions
--
______
Regards,
Greg



JE McGimpsey

Events are not disabled
 
Works fine for me. What are you expecting to happen?

If you don't want to see the *alert*, use

On Error Resume Next
Application.DisplayAlerts = False
wks.Delete
Application.DisplayAlerts = True
On Error GoTo 0



In article ,
Greg wrote:

hi,

I'm deleting a sheet w/ data via code and the following is not working??

Application.EnableEvents = False
wks.Delete
Application.EnableEvents = True

Thank you for your suggestions


Greg

Events are not disabled
 
Exactly! Appreciate it!



All times are GMT +1. The time now is 12:50 PM.

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