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

Similar Posts

One Comment

Leave a Reply

Your email address will not be published.