D Series Macro Examples

Share Now


Delete

To delete a worksheet, use following code worksheet(2) will be deleted

Sub deletesheetDemo1()

Worksheet(2).Delete

End Sub

When you delete a sheet, Excel will display a message to warn user whether they want to delete the sheet or not . To disable this message, use the code below

Sub DeletesheetDemo2()

Application.displayAlerts = False

Worksheets(2).Delete

End sub

Disable the Ctrl + Break and Esc key

In order for you to prevent user to stop a macro before it finish running by pressing the Ctrl + Break and Esc key, just insert the code below at

the top of your procedure



Share Now
October 9, 2011

0 responses on "D Series Macro Examples"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Tableau Training in Delhi

    All Rights Reserved. EC Analytics Consulting 2014 - 2019.

    NM 23, Sector 14, OLD DLF Colony - Gurgaon (Haryana) India. 9582876837 | Privacy Policy

    Drop us a Query

    Call Us: +91 8826547882

    Drop us a Query