+91-8826547882

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

October 9, 2011

0 Responses on D Series Macro Examples"

Leave a Message

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

© copyright www.excelcrazy.com. All rights reserved. Design and Development by www.creativebrainweb.com

Your Name (required)

Your Email (required)

Your Phone no. (required)

Your Location (required)

Your Message for us...

captcha