ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removal of standard Delete msg from within VBA (https://www.excelbanter.com/excel-programming/332912-removal-standard-delete-msg-within-vba.html)

Darin Kramer

Removal of standard Delete msg from within VBA
 
Hi guys,

My macro creats a new sheet, and also deletes the old sheet. I want to
NOT show the message "Data my exist in the sheet(s) selected for
Deletion. To permanently delete the data press delete", but it shows
when I give the delte command.

Any ideas?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***

Tom Ogilvy

Removal of standard Delete msg from within VBA
 
Application.DisplayAlerts = False
worksheets(1).Delete
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...
Hi guys,

My macro creats a new sheet, and also deletes the old sheet. I want to
NOT show the message "Data my exist in the sheet(s) selected for
Deletion. To permanently delete the data press delete", but it shows
when I give the delte command.

Any ideas?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***




Vobiscum[_6_]

Removal of standard Delete msg from within VBA
 

hi,

Try with

Sub test()
Application.DisplayAlerts = False
Sheets("sheet1").Delete
Application.DisplayAlerts = True
End Sub


Rgds,

vobiscu

--
Vobiscu
-----------------------------------------------------------------------
Vobiscum's Profile: http://www.msusenet.com/member.php?userid=245
View this thread: http://www.msusenet.com/t-187056730



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

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