ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code to OK DeleteSheet automatically (https://www.excelbanter.com/excel-programming/408023-code-ok-deletesheet-automatically.html)

Mikey

Code to OK DeleteSheet automatically
 
I have DeleteSheet code at the end of my macro and the box always pops asking
if I want to Delete the Sheet. What is code to make it automatically close
or = True?
--
Mickey

Tom Hutchins

Code to OK DeleteSheet automatically
 
Put Application.DisplayAlerts = False
before your DeleteSheet code and
Application.DisplayAlerts = True
after it.

Hope this helps,

Hutch

"Mikey" wrote:

I have DeleteSheet code at the end of my macro and the box always pops asking
if I want to Delete the Sheet. What is code to make it automatically close
or = True?
--
Mickey


Mikey

Code to OK DeleteSheet automatically
 
Works perfectly. Thanks for the time.
--
Mickey


"Tom Hutchins" wrote:

Put Application.DisplayAlerts = False
before your DeleteSheet code and
Application.DisplayAlerts = True
after it.

Hope this helps,

Hutch

"Mikey" wrote:

I have DeleteSheet code at the end of my macro and the box always pops asking
if I want to Delete the Sheet. What is code to make it automatically close
or = True?
--
Mickey



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

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