Friday, August 31, 2012

How to Add, Delete, Rename Sheets In Active WorkBook using VBA Macro

VBA Macro To Add, Delete, Rename Sheets In a Active WorkBook
Sub AddDelRenam()
Dim x as Integer, y as Integer
x = InputBox("Enter The Sheet Name To Add :")
Sheets.ADD.Name = x

y = InputBox("Enter The Sheet Name To Delete :")
Sheets(x).Delete

A = InputBox("Enter The Sheet Name To Rename :")
B = InputBox("Enter The New Name To Sheet :" & A)
Sheets(A).Name = B
End Sub

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog