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

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

Leave a Reply

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