ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro, Auto Return (https://www.excelbanter.com/excel-programming/439411-macro-auto-return.html)

Baloney12

Macro, Auto Return
 
I'm writing a macro in excel and have to create temporary tabs within the
file, and then delete them. Is there any way I can write into the macro a key
return so when it asks if I'm sure I want to delete it does it automatically,
because everytime I run the macro it stops at the point the temporary sheet
is being deleted and wants me to confirm it, and I have to hit enter to
continue


FSt1

Macro, Auto Return
 
hi
just before the delete, add this line
Application.DisplayAlerts = False

then after the delete has happened, add this line
Application.DisplayAlerts = true

regards
FSt1


"Baloney12" wrote:

I'm writing a macro in excel and have to create temporary tabs within the
file, and then delete them. Is there any way I can write into the macro a key
return so when it asks if I'm sure I want to delete it does it automatically,
because everytime I run the macro it stops at the point the temporary sheet
is being deleted and wants me to confirm it, and I have to hit enter to
continue



All times are GMT +1. The time now is 02:58 PM.

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