VBA – Macro to List all Sheets in a Workbook


The following macro loops through every sheet in a workbook and writes the tab name of each sheet sequentially to a sheet you choose. This could be handy for a quick list of every sheet in a workbook with many sheets.

List all Worksheets in a Workbook

To use the macro just replace the word Sheet1(it appears twice) in the code with the tab name where you would like the results. Make sure there isn’t any important information on the output tab because it clears the data their before writing to it.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!


<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues:

3 Comments

  1. James Bayfield September 28, 2017 at 2:12 pm - Reply

    Doesn’t work. Debug error line 9.

    • Steven Rynearson September 28, 2017 at 2:44 pm - Reply

      Do you have a sheet named “Sheet1” in your workbook? If not, you’ll need to replace “Sheet1” with your designed sheet name.

  2. Jayakumar October 16, 2017 at 10:18 am - Reply

    Working perfectly, Thank you !

Leave A Comment