Friday, January 13, 2012

VBA program to ADD sheets with the Month Names

!.....Program to Add sheets in the Activeworkbook with all the Month Names.......!

Sub Add_Sheets()

On Error Resume Next
Application.DisplayAlerts = 0
For i = 1 To 12
On Error Resume Next
Sheets(MonthName(i)).Delete
Sheets.Add.Name = MonthName(i)
ActiveSheet.Next.Select
Next
Sheets(Array("sheet1", "sheet2", "sheet3")).Delete
Application.DisplayAlerts = 1

End Sub

No comments:

Post a Comment

Excel VBA to send email from excel with HTML table in a email body

'' Excel vba script to send email from outlook & email body in HTML table format. ''Write down email body in HTML tags...