VBA Code to Add New Sheet at Beginning or End of Excel File

VBA Code to Add New Sheet at Beginning or End of Excel File

In VBA, it is sometime important to add a worksheet at the right place in the Excel. Here is a simple an effective code that adds a new worksheet at the end of Excel file

Worksheets.Add After:=Worksheets(Worksheets.Count)

 

If you want to add the new worksheet at the beginning of the file, you can use the below code

Worksheets.Add Before:=Worksheets(1)

 

Excel Tricks

Author:
Excelsirji.com was started with the thought of making people experience easy while working with Excel, data analytics, vba, automations etc.
Comments

Leave a Reply

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

Are you a Data Enthusiast?

Join us for a ride on your data and automate your stuffs

Business Analytics
Data Analyst
Programming for Data Science
Predictive Analytics for Business