Apr 16, 2013 · VBA-Excel: Get the names of all WorkSheets in a Excel (WorkBook) by SJ · Published April 16, 2013 · Updated September 19, 2015 Open a new Excel WorkBook and press “Alt+F11” to open the Visual Basic Editor
VBA Assumes the Active Workbook and Active Sheet. If we don't specify which workbook or worksheet we want to run a line of code on, then VBA will run that code on the Active Workbook and Active Worksheet. The ActiveWorkbook is the workbook that you (or the user) has selected before running the macro. How To Get Sheet Names Using VBA in Microsoft Excel In case you want to find out a way which can get you all the names of the sheet that are visible i.e. not hidden. In this article, we will learn how to get names of the visible sheets only, using VBA code.