Excel Crazy

D Series Macro Examples

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

December 31, 2011

0 responses on "D Series Macro Examples"

Leave a Message

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

top
 

© LOKESH PALIWAL 1987 - 2018

LOKESH@EXCELCRAZY[DOT]COM | 8826547882

Reporting Solutions | Data Consulting | Analytics Training

CONTACT US
close slider

Your Name (required)

Your Email (required)

Your Phone no. (required)

Your Message for us...

Skip to toolbar