From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Suppress and restore alerts

Suppress and restore alerts - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Suppress and restore alerts

[Instructor] The main benefit of creating code using VBA in Excel is to automate processes so humans don't have to intervene. Some actions though, such as deleting a worksheet will display an alert box asking if the user is sure that they want to actually delete that worksheet. In this movie, I will show you how to suppress those alerts and then turn them back on. My sample file is 0402 Suppress Alerts. And that's an Excel macro-enabled workbook that you can find in the chapter four folder of your exercise files collection. In this workbook, I have two worksheets, one called March and the second called March and then in parentheses two. So what appears to have happened is that there is a duplicate of the March worksheet. We don't need two of them. So I will write VBA code to delete the second one. And also because I, as the user, don't want to have to be involved in the process, I will suppress the alert box that will…

Contents