Vba Worksheet Name Variable. Both the name and index of a worksheet can easily be modified by the user (accidentally or not), unless workbook structure is protected. There is another way to perform this activity.
The bSet variable is True, so all the settings are turned on. As the name indicates, the value of the variable can Static variables can be very useful. Not what you notice is that compared to acquiring the Worksheet by its VBA Name, when using the defaults Worksheets or Sheets object you land with the said Worsheet, but from the ActiveWorkbook.
You will learn to create the different types of Excel VBA (Visual Basic for Applications) Variable Data Types.
You have renamed the three worksheets Monday, Tuesday and Wednesday in that order and coded VBA sub procedures that reference these.
Difference between Worksheets and Sheets in VBA. Using this property without an object qualifier is equivalent to using ActiveWorkbook. You can use this to pass the worksheet's name to your code.