Vba Sheet Name Index. Macro Examples The following Excel VBA macro displays the active sheet. Sorry, I didn't see the last part about current year.
These functions won't work in a regular sheet, they. The way around this, then, is to compare the name of each item in the Sheets collection against those in the Charts collection. VBA's ActiveWorkbook property refers to the workbook with the focus.
You write macros in the Visual Basic Editor.
If the name is in both collections, than it is safe to assume that.
Process Followed by VBA Code to Delete Sheet by Name. The ActiveSheet property is a member of the Excel. The index number represents the position of a sheet, worksheet or chart sheet in the tab bar of the workbook you deal with, from.