Vba Worksheet Or Worksheets. But you can find the maximum count of worksheets, and then use that number as an index for the Worksheets object. Well, use Worksheet when you want it to be clear you are working with a worksheet, when you want to keep your functions clean of multiple responsibilities, and where you want good intellisense A user could call it with a worksheet's variable name (as displayed in one of the VBA editor panels) "Sheets" considers all the worksheets in the workbook including chart sheet.
First, let us try to select a worksheet using the worksheet object in VBA. We will cover all the nuisances e.g. When you are working with VBA inside Excel, it is more than likely that you will be automating some sort of changes to a worksheet inside your file.
This probably sounds quite confusing, but we will make it clear.
VBA Activesheet and how it compares to regular Worksheets, how to Select Worksheets, how to Activate Worksheets.
Add Method in Excel VBA, or add new worksheets at the back or before specific worksheet. If you want to know how to do something quickly then check out the quick guide to the VBA Worksheet below. Video: Protect Macro Fails When Sheets Grouped.